Understanding ObjectCreate() function.

Back to topics list To post a new topic, please log in or register
avatar
1
think2grow 2016.02.01 20:23
 
if(iRSI5 <= 10)
         {
            //Up Arrow;
            bool ObjectCreate(NULL,"Buy Arrow",OBJ_ARROW_BUY,0,Close[1],Low[1]);
         }

I'm having trouble getting this to work. I am very new to programming and would love some guidance in terms of understanding the ObjectCreate() function and its requirements in terms of code. 

 Please don't just link the objectCreate() section of the book ObjectCreate()  as I've read through and I'm still having trouble.

Thank you in advance to all here!  

avatar
735
honest_knave 2016.02.01 20:43 #
 

A few things that might help:

Don't declare ObjectCreate as a bool - MQL4 has already defined it as a function returning a bool.

Close is a price, not a time. You'll need to use Time[] instead

if(iRSI5 <= 10)
         {
            //Up Arrow;
            ObjectCreate(0,"Buy Arrow",OBJ_ARROW_BUY,0,Time[0],Low[1]);
         }

 

 Hope that helps

Back to topics list  

To add comments, please log in or register