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?

 

***

Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types
  • www.mql5.com
Object Types - Objects Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Files:
 
  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.
 
DarthRickSanchez1 :

***

Insert the code correctly! Use the button Code!

 
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.

 
Vladimir Karputov:

Insert the code correctly! Use the button !

okay
 
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: