I need help!!!!!

 

i'll be so gald if someone is able to help me to handle this problem. i just started learning this language.( and excuse if my english is bad.)

And here's my idea, it's simple, but it's tricky for me to write the code.

I want to draw a line on M1 or M5's chart by using the High && Low Price of the second candle on M30. 

so i can see the break out on the M1 or M5's chart.

thank you for viewing this page.

and thank you for helping me.

 
What have you tried ? Please show your attempt.
 

Think about how you would do it by looking at the chart.

First of all you would locate the M30 candle. How would you do this? By looking at the time axis along the bottom.

So, if you want the code to do this, it will have to do exactly the same, find the candle relative to the time.

For this you will use iBarShift in the code.

 

Then you would draw a horizontal line at the High and Low of that candle. You can find that with iHigh and iLow.

You will draw the line using ObjectCreate. 

 
GumRai:

Think about how you would do it by looking at the chart.

First of all you would locate the M30 candle. How would you do this? By looking at the time axis along the bottom.

So, if you want the code to do this, it will have to do exactly the same, find the candle relative to the time.

For this you will use iBarShift in the code.

 

Then you would draw a horizontal line at the High and Low of that candle. You can find that with iHigh and iLow.

You will draw the line using ObjectCreate. 


thank you so much. i will try it.

by the way. can you tell me how to get the high quality history data? 

i know how to download it.

but i'm afraid the data won't be accurate. 

Reason: