Merge and smooth the Ichimoku Kijun-Sen & Tenkan-Sen Lines and plot them on the chart
//--- indicator buffers mapping SetIndexBuffer(0,ExtTenkanBuffer,INDICATOR_DATA); SetIndexBuffer(1,ExtKijunBuffer,INDICATOR_DATA); SetIndexBuffer(3,ExtMergedLinesBuffer,INDICATOR_DATA); //* //--- IndicatorSetInteger(INDICATOR_DIGITS,_Digits+1); //--- sets first bar from what index will be drawn PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,InpTenkan); PlotIndexSetInteger(1,PLOT_DRAW_BEGIN,InpKijun); PlotIndexSetInteger(2,PLOT_DRAW_BEGIN,InpMergedLine); //* //--- lines shifts when drawing PlotIndexSetInteger(3,PLOT_SHIFT,InpKijun); PlotIndexSetInteger(4,PLOT_SHIFT,-InpKijun); PlotIndexSetInteger(5,PLOT_SHIFT,0); //*
You did not define all six buffers but you are trying to access them.
In my Pine Script EA I am merging the Kijun-Sen & Tenkan-Sen the following way :
It is quite straightforward in pine script and I am struggling to implement this into an MQL5 indicator existing script I have found here : https://www.mql5.com/en/code/34225.
The idea is after having modified the indicator to get the relevant data from this indicator into my MT5 EA.
Hereafter the code. You can find the code I have already added or modified to merge the two lines marked with a //*.
I am stuck and I would appreciate some expertise in order to move forward.
Many thanks in advance. Cheers.