Skip to content

Test correctness of Ichimoku indicator #656

Description

@kenorb

In Ichimoku 2nd and 3rd buffers are shifted by senkou_span_shift bars.

In this code example, it's shifted as CopyBuffer(ind_handle,2,-senkou_span_shift and CopyBuffer(ind_handle,3,-senkou_span_shift.

if senkou_span_shift>0, the line is shifted in the future direction by senkou_span_shift bars

but in MQL5's Examples/Ichimoku.mq5, the shift is different:

   PlotIndexSetInteger(2,PLOT_SHIFT,InpKijun);
   PlotIndexSetInteger(3,PLOT_SHIFT,-InpKijun);

And in MQL4 example (Ichimoku.mq4) also different:

   SetIndexShift(2,InpKijun);
   SetIndexShift(3,InpKijun);

We should check and update GetEntryAlter() with the right shifts (for 2nd and 3rd buffers) for each platform to produce the right values to be consistent between 2 platforms.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions