How do I draw a trade line from the oldest pips with the current price ?
-
How do I draw a trade line from the oldest pips with the current price ?
If the price crosses the line up, I open a buy - and a sell down

-
@khalids222 Do you mean the oldest candle on chart? The bet way to get it is via custom indicator. Otherwise you would ned a loop so huge that probably would hinder the whole EA.
-
@l-andorrà said in How do I draw a trade line from the oldest pips with the current price ?:
Do you mean the oldest candle on chart? The bet way to get it is via custom indicator. Otherwise you would ned a loop so huge that probably would hinder the whole EA.
My problem is in drawing only, let me say from candle number 500 FOR (15M) to the current price only
-
@khalids222 Then you need this block:

You need to specify the first and the last candles of the line. As you can see the values by default are 0 and 10. You can select 0 and 500 if necessary.