Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test correctness of Ichimoku indicator #656

Open
kenorb opened this issue Aug 4, 2022 · 0 comments
Open

Test correctness of Ichimoku indicator #656

kenorb opened this issue Aug 4, 2022 · 0 comments
Assignees
Labels
Milestone

Comments

@kenorb
Copy link
Member

kenorb commented Aug 4, 2022

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.

@kenorb kenorb added bug indicators Indicators labels Aug 4, 2022
@kenorb kenorb added this to the v3.004 milestone Aug 4, 2022
kenorb added a commit that referenced this issue Aug 12, 2022
* origin/dev-indi-no-chart4: (90 commits)
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge tag 'v3.001' into dev-indi-no-chart4
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Disables Indi_Price for MQL4 due to failure
  GHA: Sets BtYears to 2021
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Reenables more indicators for testing
  IndicatorsTest: Reenables indicators for testing
  Trade: Reenables CalcLotSize()
  Indi_ZigZag: Fixes indicator path for MQL4
  GHA: Test: Sets BtDays to 4-8 to avoid time limits
  Merge tag 'v3.000' into dev-indi-no-chart4
  Indicators: Fixes potential issues with OnIndicator mode
  Indi_AppliedPrice: Fixes infinite loop when run on indicator
  Indi_Ichimoku: Shift 2nd and 3rd buffer by senkou_span_shift bars [GH-656]
  Indicator: GetEntryAlter: Fixes issue with shift
  GHA: Changes back BtDays to 4-8
  Indicator: Fixes issue with ::iTime not being rounded in MT4
  GHA: Uses MT4 4.0.0.1359 to test indicators
  Indicator/IndicatorTf: Fixes issue with MQL4 error 4066 (ERR_HISTORY_WILL_UPDATED)
  ...
kenorb added a commit that referenced this issue Aug 12, 2022
* origin/dev-indi-no-chart4: (90 commits)
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge tag 'v3.001' into dev-indi-no-chart4
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Disables Indi_Price for MQL4 due to failure
  GHA: Sets BtYears to 2021
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Reenables more indicators for testing
  IndicatorsTest: Reenables indicators for testing
  Trade: Reenables CalcLotSize()
  Indi_ZigZag: Fixes indicator path for MQL4
  GHA: Test: Sets BtDays to 4-8 to avoid time limits
  Merge tag 'v3.000' into dev-indi-no-chart4
  Indicators: Fixes potential issues with OnIndicator mode
  Indi_AppliedPrice: Fixes infinite loop when run on indicator
  Indi_Ichimoku: Shift 2nd and 3rd buffer by senkou_span_shift bars [GH-656]
  Indicator: GetEntryAlter: Fixes issue with shift
  GHA: Changes back BtDays to 4-8
  Indicator: Fixes issue with ::iTime not being rounded in MT4
  GHA: Uses MT4 4.0.0.1359 to test indicators
  Indicator/IndicatorTf: Fixes issue with MQL4 error 4066 (ERR_HISTORY_WILL_UPDATED)
  ...
kenorb added a commit that referenced this issue Apr 28, 2024
* origin/v3.003-dev: (93 commits)
  Cherry-pick: Added SerializeStub() method to Chart class. Added more error checks. (#629)
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge remote-tracking branch 'origin/dev-indi-no-chart4' into v3.003-dev
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge tag 'v3.001' into dev-indi-no-chart4
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Disables Indi_Price for MQL4 due to failure
  GHA: Sets BtYears to 2021
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Reenables more indicators for testing
  IndicatorsTest: Reenables indicators for testing
  Trade: Reenables CalcLotSize()
  Indi_ZigZag: Fixes indicator path for MQL4
  GHA: Test: Sets BtDays to 4-8 to avoid time limits
  Merge tag 'v3.000' into dev-indi-no-chart4
  Indicators: Fixes potential issues with OnIndicator mode
  Indi_AppliedPrice: Fixes infinite loop when run on indicator
  Indi_Ichimoku: Shift 2nd and 3rd buffer by senkou_span_shift bars [GH-656]
  Indicator: GetEntryAlter: Fixes issue with shift
  GHA: Changes back BtDays to 4-8
  ...
kenorb added a commit that referenced this issue Apr 28, 2024
* origin/v3.003-dev: (93 commits)
  Cherry-pick: Added SerializeStub() method to Chart class. Added more error checks. (#629)
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge remote-tracking branch 'origin/dev-indi-no-chart4' into v3.003-dev
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge tag 'v3.001' into dev-indi-no-chart4
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Disables Indi_Price for MQL4 due to failure
  GHA: Sets BtYears to 2021
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Reenables more indicators for testing
  IndicatorsTest: Reenables indicators for testing
  Trade: Reenables CalcLotSize()
  Indi_ZigZag: Fixes indicator path for MQL4
  GHA: Test: Sets BtDays to 4-8 to avoid time limits
  Merge tag 'v3.000' into dev-indi-no-chart4
  Indicators: Fixes potential issues with OnIndicator mode
  Indi_AppliedPrice: Fixes infinite loop when run on indicator
  Indi_Ichimoku: Shift 2nd and 3rd buffer by senkou_span_shift bars [GH-656]
  Indicator: GetEntryAlter: Fixes issue with shift
  GHA: Changes back BtDays to 4-8
  ...
kenorb added a commit that referenced this issue Apr 28, 2024
* origin/v3.003-dev: (93 commits)
  Cherry-pick: Added SerializeStub() method to Chart class. Added more error checks. (#629)
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge remote-tracking branch 'origin/dev-indi-no-chart4' into v3.003-dev
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge tag 'v3.001' into dev-indi-no-chart4
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Disables Indi_Price for MQL4 due to failure
  GHA: Sets BtYears to 2021
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Reenables more indicators for testing
  IndicatorsTest: Reenables indicators for testing
  Trade: Reenables CalcLotSize()
  Indi_ZigZag: Fixes indicator path for MQL4
  GHA: Test: Sets BtDays to 4-8 to avoid time limits
  Merge tag 'v3.000' into dev-indi-no-chart4
  Indicators: Fixes potential issues with OnIndicator mode
  Indi_AppliedPrice: Fixes infinite loop when run on indicator
  Indi_Ichimoku: Shift 2nd and 3rd buffer by senkou_span_shift bars [GH-656]
  Indicator: GetEntryAlter: Fixes issue with shift
  GHA: Changes back BtDays to 4-8
  ...
kenorb added a commit that referenced this issue Apr 28, 2024
* origin/v3.003-dev: (93 commits)
  Cherry-pick: Added SerializeStub() method to Chart class. Added more error checks. (#629)
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge remote-tracking branch 'origin/dev-indi-no-chart4' into v3.003-dev
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge tag 'v3.001' into dev-indi-no-chart4
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Disables Indi_Price for MQL4 due to failure
  GHA: Sets BtYears to 2021
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Reenables more indicators for testing
  IndicatorsTest: Reenables indicators for testing
  Trade: Reenables CalcLotSize()
  Indi_ZigZag: Fixes indicator path for MQL4
  GHA: Test: Sets BtDays to 4-8 to avoid time limits
  Merge tag 'v3.000' into dev-indi-no-chart4
  Indicators: Fixes potential issues with OnIndicator mode
  Indi_AppliedPrice: Fixes infinite loop when run on indicator
  Indi_Ichimoku: Shift 2nd and 3rd buffer by senkou_span_shift bars [GH-656]
  Indicator: GetEntryAlter: Fixes issue with shift
  GHA: Changes back BtDays to 4-8
  ...
kenorb added a commit that referenced this issue Apr 28, 2024
* origin/v3.003-dev: (93 commits)
  Cherry-pick: Added SerializeStub() method to Chart class. Added more error checks. (#629)
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge remote-tracking branch 'origin/dev-indi-no-chart4' into v3.003-dev
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge tag 'v3.001' into dev-indi-no-chart4
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Disables Indi_Price for MQL4 due to failure
  GHA: Sets BtYears to 2021
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Reenables more indicators for testing
  IndicatorsTest: Reenables indicators for testing
  Trade: Reenables CalcLotSize()
  Indi_ZigZag: Fixes indicator path for MQL4
  GHA: Test: Sets BtDays to 4-8 to avoid time limits
  Merge tag 'v3.000' into dev-indi-no-chart4
  Indicators: Fixes potential issues with OnIndicator mode
  Indi_AppliedPrice: Fixes infinite loop when run on indicator
  Indi_Ichimoku: Shift 2nd and 3rd buffer by senkou_span_shift bars [GH-656]
  Indicator: GetEntryAlter: Fixes issue with shift
  GHA: Changes back BtDays to 4-8
  ...
kenorb added a commit that referenced this issue Apr 28, 2024
* origin/v3.003-dev: (93 commits)
  Cherry-pick: Added SerializeStub() method to Chart class. Added more error checks. (#629)
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge remote-tracking branch 'origin/dev-indi-no-chart4' into v3.003-dev
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge tag 'v3.001' into dev-indi-no-chart4
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Disables Indi_Price for MQL4 due to failure
  GHA: Sets BtYears to 2021
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Reenables more indicators for testing
  IndicatorsTest: Reenables indicators for testing
  Trade: Reenables CalcLotSize()
  Indi_ZigZag: Fixes indicator path for MQL4
  GHA: Test: Sets BtDays to 4-8 to avoid time limits
  Merge tag 'v3.000' into dev-indi-no-chart4
  Indicators: Fixes potential issues with OnIndicator mode
  Indi_AppliedPrice: Fixes infinite loop when run on indicator
  Indi_Ichimoku: Shift 2nd and 3rd buffer by senkou_span_shift bars [GH-656]
  Indicator: GetEntryAlter: Fixes issue with shift
  GHA: Changes back BtDays to 4-8
  ...
kenorb added a commit that referenced this issue Apr 29, 2024
* origin/v3.003-dev: (93 commits)
  Cherry-pick: Added SerializeStub() method to Chart class. Added more error checks. (#629)
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge remote-tracking branch 'origin/dev-indi-no-chart4' into v3.003-dev
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge tag 'v3.001' into dev-indi-no-chart4
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Disables Indi_Price for MQL4 due to failure
  GHA: Sets BtYears to 2021
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Reenables more indicators for testing
  IndicatorsTest: Reenables indicators for testing
  Trade: Reenables CalcLotSize()
  Indi_ZigZag: Fixes indicator path for MQL4
  GHA: Test: Sets BtDays to 4-8 to avoid time limits
  Merge tag 'v3.000' into dev-indi-no-chart4
  Indicators: Fixes potential issues with OnIndicator mode
  Indi_AppliedPrice: Fixes infinite loop when run on indicator
  Indi_Ichimoku: Shift 2nd and 3rd buffer by senkou_span_shift bars [GH-656]
  Indicator: GetEntryAlter: Fixes issue with shift
  GHA: Changes back BtDays to 4-8
  ...
kenorb added a commit that referenced this issue Apr 29, 2024
* origin/v3.003-dev: (93 commits)
  Cherry-pick: Added SerializeStub() method to Chart class. Added more error checks. (#629)
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge remote-tracking branch 'origin/dev-indi-no-chart4' into v3.003-dev
  IndicatorData: IndicatorDataEntryValue: Adds support for datetime type
  Merge tag 'v3.001' into dev-indi-no-chart4
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Disables Indi_Price for MQL4 due to failure
  GHA: Sets BtYears to 2021
  Strategy/Trade: Reenables previously disabled code
  IndicatorsTest: Reenables more indicators for testing
  IndicatorsTest: Reenables indicators for testing
  Trade: Reenables CalcLotSize()
  Indi_ZigZag: Fixes indicator path for MQL4
  GHA: Test: Sets BtDays to 4-8 to avoid time limits
  Merge tag 'v3.000' into dev-indi-no-chart4
  Indicators: Fixes potential issues with OnIndicator mode
  Indi_AppliedPrice: Fixes infinite loop when run on indicator
  Indi_Ichimoku: Shift 2nd and 3rd buffer by senkou_span_shift bars [GH-656]
  Indicator: GetEntryAlter: Fixes issue with shift
  GHA: Changes back BtDays to 4-8
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants