Line joining Current and 10th candle

 
Hello coders. Please help me understand how to draw a line joining the 10th candle close price with the last candle close price in an EA. Thank you in advance.
MT5 user.
 
Nelson Wanyama :
Hello coders. Please help me understand how to draw a line joining the 10th candle close price with the last candle close price in an EA. Thank you in advance.
MT5 user.

Your question is not entirely clear. Can you draw your question as a picture?

 
Vladimir Karputov:

Your question is not entirely clear. Can you draw your question as a picture?

I saw a zigzag indicator and started working on a modified version. Say, instead of using a fractal zigzag lines, we use the 10th and previous candle close prices to draw the zig zag. 
 
I'm still working it out. I still don't have a clear picture of it since I got stuck at the line. 
If the line has a positive gradient with a gradient filter as an external variable. That is a buy signal
 

If the current close is higher than the close ten candles ago, there is no way that the connecting line doesn't have a positive gradient, too. No need to draw a line, just compare the prices. If you insist on drawing a line, simply create an OBJ_TREND object.

 
Chris70 :

If the current close is higher than the close ten candles ago, there is no way that the connecting line doesn't have a positive gradient, too. No need to draw a line, just compare the prices. If you insist on drawing a line, simply create an OBJ_TREND object .

The indicator on graphic objects is very bad. Indicator Drawing Styles: Indicator Styles in Examples

Documentation on MQL5: Custom Indicators / Indicator Styles in Examples
Documentation on MQL5: Custom Indicators / Indicator Styles in Examples
  • www.mql5.com
The MetaTrader 5 Client Terminal includes 38 technical indicators that can be used in MQL5 programs using appropriate functions. But the main advantage of the MQL5 language is the ability to create custom indicators, which can then be used in Expert Advisors or simply applied on price charts for the purpose of technical analysis. The entire set...
Reason: