Same code, same pair, same broker and back test is Variant! - page 2

 
I am sure that there is a solution.
It might be my mistake. But really i have tested with two computers.
 
Mohammad Soubra:
I am sure that there is a solution.
It might be my mistake. But really i have tested with two computers.

I didn't get this error when I tried this code,
Anyway try the following code, this might not be the perfect solution but try it anyway.. :)

void OnTick()
{
   if(OrdersTotal()>0) return;
   RefreshRates();
   if(iRSI(NULL,PERIOD_M1,14,PRICE_CLOSE,0) > 70)
   int x = OrderSend(NULL,    OP_SELL,    0.01,    Bid,     10,   0,    Bid-3*Point*10); //using 5 digits broker
}
 
Lakshan Perera:

I didn't get this error when I tried this code,
Anyway try the following code, this might not be the perfect solution but try it anyway.. :)

It is not an error
It is variant back test results for the same code using fixed period (PERIOD_M1)
 
Mohammad Soubra:
It is not an error
It is variant back test results for the same code using fixed period (PERIOD_M1)

Yeah sorry , I know my mistake, it is not an error.. :D
But I got the same results over all the time periods

 
Lakshan Perera:

Yeah sorry , I know my mistake, it is not an error.. :D
But I got the same results over all the time periods

OMG!
Seems that I am not perfectly doing the setup for the data files.
However, the supplier is telling that there is no problem and data automatically are generated!
 
Mohammad Soubra:
OMG!
Seems that I am not perfectly doing the setup for the data files.
However, the supplier is telling that there is no problem and data automatically are generated!

Once again, tick generation is based on OHLC prices and support points, is different between a M1 chart & a M15 chart : indicators datas are calculated from these prices. That algo has been added to MT4 and remained in MT5.

https://www.mql5.com/en/articles/75

The Algorithm of Ticks' Generation within the Strategy Tester of the MetaTrader 5 Terminal
The Algorithm of Ticks' Generation within the Strategy Tester of the MetaTrader 5 Terminal
  • 2010.06.02
  • MetaQuotes Software Corp.
  • www.mql5.com
The MetaTrader 5 terminal contains an integrated development environment for the development of fully automated strategies (trading robots), which can perform trading without any human intervention. Another name for these trading robots is Expert Advisors. Expert Advisors and technical indicators for the MetaTrader 5 terminal are written using...
 
Icham Aidibe:

Once again, tick generation is based on OHLC prices and support points, is different between a M1 chart & a M15 chart : indicators datas are calculated from these prices. That algo has been added to MT4 and remained in MT5.

https://www.mql5.com/en/articles/75

Have you read my simple code ?
 
Mohammad Soubra:
What could be the answer?

I didn't check or try, however I would like to help you.

You are using tickdata right ? Did you try with "normal" MT4 data ?

Your code relies on ticks, if you get different results it's most probably because the starting point (tick) is not the same when you change the timeframe.

 
Alain Verleyen:

I didn't check or try, however I would like to help you.

You are using tickdata right ? Did you try with "normal" MT4 data ?

Your code relies on ticks, if you get different results it's most probably because the starting point (tick) is not the same when you change the timeframe.

It is the same test duration (from 1/1/2013)
See the video it is 3 minutes only
 
Mohammad Soubra:
It is the same test duration (from 1/1/2013)
I know that. Please answer my questions if you want help.
Reason: