How validate the Ichimoku's line

 
Dear Friends,

Hope this question finds you well and be great as usual.

I've written a code for finding the value Ichimoku lines but I've just validate Tenkan-Sen and Kijun-Sen.

would you mind helping me for this aim?

void intIchi()

  {
   int Ichi_handle = iIchimoku(NULL, PERIOD_M1, 9, 26, 52);
   CopyBuffer(Ichi_handle, 0, 0, 100, Tenm1);                            //Tenkan_sen
   ArraySetAsSeries(Tenm1, true);
   CopyBuffer(Ichi_handle, 1, 0, 100, Kijm1);                              // Kijun_sen
   ArraySetAsSeries(Kijm1, true);
   CopyBuffer(Ichi_handle, 2, 0, 100, SenAm1);                           //Senkou_Span_A
   ArraySetAsSeries(SenAm1, true);
   CopyBuffer(Ichi_handle, 3, 0, 100, SenBm1);                           //Senkou_Span_B
   ArraySetAsSeries(SenBm1, true);
   CopyBuffer(Ichi_handle, 4, 0, 100, Chikm1);                           //Chinkou_Span
   ArraySetAsSeries(Chikm1, true);

}


 
Copy buffer have to go to ontick
 
What is the problem with this code?
 
mh.vasheghany int Ichi_handle = iIchimoku(NULL, PERIOD_M1, 9, 26, 52);
  1. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
              Messages Editor

  2. Get your handle in OnInit.

    Creating an iMA indicator handle, getting indicator values.
              How to start with MQL5 - General - MQL5 programming forum - Page 3 #22 2020.03.08

 
amando:
Copy buffer have to go to ontick
Thanks for your help
 
amando:
Copy buffer have to go to ontick

Dear amando,

you are right, I refer it to the ontick

I have a problem to find the correct value of the Senkou_Span_A, Senkou_Span_BChinkou_Span. please help me dear

thanks

 
 
William Roeder:
  1. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
              Messages Editor

  2. Get your handle in OnInit.

    Creating an iMA indicator handle, getting indicator values.
              How to start with MQL5 - General - MQL5 programming forum - Page 3 #22 2020.03.08

double Tenm1[100];

double Kijm1[100];

double SenAm1[100];

double SenBm1[100];

double Chikm1[100];


void OnTick()

  {

intIchi();

  }

//+------------------------------------------------------------------+

//| Get value of buffers for the iIchimoku                           |

//|  the buffer numbers are the following:                           |

//|   0 - TENKANSEN_LINE, 1 - KIJUNSEN_LINE, 2 - SENKOUSPANA_LINE,   |

//|   3 - SENKOUSPANB_LINE, 4 - CHIKOUSPAN_LINE                      |

//+------------------------------------------------------------------+

void intIchi()

  {

   int Ichi_handle = iIchimoku(NULL, PERIOD_M1, 9, 26, 52);

   CopyBuffer(Ichi_handle, 0, 0, 100, Tenm1); //main

   ArraySetAsSeries(Tenm1, true);

   CopyBuffer(Ichi_handle, 1, 0, 100, Kijm1); //signal

   ArraySetAsSeries(Kijm1, true);

   CopyBuffer(Ichi_handle, 2, 0, 100, SenAm1); //main

   ArraySetAsSeries(SenAm1, true);

   CopyBuffer(Ichi_handle, 3, 0, 100, SenBm1); //main

   ArraySetAsSeries(SenBm1, true);

   CopyBuffer(Ichi_handle, 4, 0, 100, Chikm1); //signal

   ArraySetAsSeries(Chikm1, true);

  }

Discover new MetaTrader 5 opportunities with MQL5 community and services
Discover new MetaTrader 5 opportunities with MQL5 community and services
  • www.mql5.com
Ask questions on technical analysis, discuss trading systems and improve your MQL5 programming skills to develop your own trading strategies. Communicate and share your experience with traders from anywhere in the world, answer questions and help beginners — MQL5.community is developing along with you. How validate the Ichimoku's line Dear...
 

Forum on trading, automated trading systems and testing trading strategies

When you post code please use the CODE button (Alt-S)!

Use the CODE button


Reason: