Expressions are not allowed on the global scale - page 3

 
lippmaje:
looks ok

 when i run the code , it places the lines but not at the high or low , you can see what i mean take a look at ss1
and there is also the problem that when i attach the indicator from the indicator window in the mt4 terminal , it does place the lines but way above from the price where it should be take a look at ss2
 

Files:
ss1.png  39 kb
ss2.png  71 kb
 

Looks like belonging to a different candle. Did you scroll the chart to find it? Else add the time of the candle in question to the lines. Create a text object maybe or print to output.

ObjectCreate(LineName1, OBJ_HLINE, 0, 0, High[i]);
And this object is never removed because it lacks the name prefix.
 
lippmaje:

Looks like belonging to a different candle. Did you scroll the chart to find it? Else add the time of the candle in question to the lines. Create a text object maybe or print to output.

And this object is never removed because it lacks the name prefix.
How do I do that? 😅😅
 
Rio12:
How do I do that? 😅😅
Read the MQL4 Reference about ObjectCreate carefully. You've learned enough to do this on your own now.
 
lippmaje:
Read the MQL4 Reference about ObjectCreate carefully. You've learned enough to do this on your own now.

well i tried but i cant figure it out 

Reason: