the minimum amount of time between buy and sells is on hour, regardless the program is buying and selling within the hourly candlesticks, how to fix?

William Roeder  
  1. You were previously asked to use the code button. Why didn't you?

  2. int SARDefinition = iSAR(_Symbol, PERIOD_H1, 0.02,0.2);

    You were previously told what is wrong with that. You still haven't fixed it.

  3. You want to know why things take an hour?

    int Data = CopyRates(_Symbol, PERIOD_H1,0,3,PriceArray);
    
    int SARDefinition = iSAR(_Symbol, PERIOD_H1, 0.02,0.2);
    Because that is your data source.
Vladimir Karputov  
DarthRickSanchez1 :

***

Insert the code correctly! Use the button Code!

DarthRickSanchez1  
William Roeder:
  1. You were previously asked to use the code button. Why didn't you?

  2. You were previously told what is wrong with that. You still haven't fixed it.

  3. You want to know why things take an hour?

    Because that is your data source.




1. did not use this type of interface before.

2. I know some js, python, and so on, how can an indicator be called for OnInit()?  got the error not declared when called on in OnTick().

3.I fixed that error, I wanted it to take an hour.

DarthRickSanchez1  
Vladimir Karputov:

Insert the code correctly! Use the button !

okay
Vladimir Karputov  
DarthRickSanchez1 :
okay

And please correct your code: remember, in MQL5, the indicator handle MUST BE CREATED ONLY ONCE, and this is done in OnInit !!!

Reason: