How can I make my EA trade or backtest with modeling based on every real tick as if they where 1 minute ohlc?
for example ... the same EA gives this two graphs
how can I make the bottom graph (real ticks) go as the top one ( ohlc 1 min )
I've tried with this:
{ { // Obtener la hora actual MqlDateTime dt_struct; TimeToStruct(TimeCurrent(), dt_struct); // Verificar si estamos en los últimos 5 segundos del minuto actual if(dt_struct.sec <= 1) { canTrade = true; // Update trailing stops for open positions ManageOpenPositions(); // Aquí va tu lógica de trading ProcessTrading(); } else if(dt_struct.sec > 1 )// && dt_struct.sec > 0 ) { ManageOpenPositions(); canTrade = false; } else if(dt_struct.sec < 0 ) { canTrade = false; } }
tried also with 59 seconds ... and is not equal.
for example ... the same EA gives this two graphs
how can I make the bottom graph (real ticks) go as the top one ( ohlc 1 min )
I've tried with this:
tried also with 59 seconds ... and is not equal.
I'm starting to think its impossible. example: in ohlc 1m, all data is in second 0, but if you have trailing, and you use real ticks, you cant have the highs and lows in the same second or in second 0 or 60 ...
so
What would be the best approach?
in all my searching, it seems that it is simply unlrealistic to use the 1 minute OHLC for testing to prove a strategy will work.
However, your comment " you cant have the highs and lows in the same second or in second 0 or 60 ... ", is true, however, you could code the ea to ignore those ticks or seconds where the highs and lowse are same values.
in all my searching, it seems that it is simply unlrealistic to use the 1 minute OHLC for testing to prove a strategy will work.
However, your comment " you cant have the highs and lows in the same second or in second 0 or 60 ... ", is true, however, you could code the ea to ignore those ticks or seconds where the highs and lowse are same values.
Interesting. Thanks for the apport.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Have I made my point? how can I do this and how does the 1 minute ohlc work? should I make it wait till second 59 or something like that? has any one have this solution?
Thanks!