MT4 multicurrency backtesting in tester environment - writting trading decisions into .csv - page 2

 
Stanislav Korotky:
Can you provide tester logs? It usually indicates errors with history.

not yet


but  I have more serios problem now.


Offline mt4...imported 1m data for 2y - all good. but

when I restart the platform..data on this particular pair is deleted and shows only 1/3 of the data?

how could i tackle this

 
kavaro:

not yet


but  I have more serios problem now.


Offline mt4...imported 1m data for 2y - all good. but

when I restart the platform..data on this particular pair is deleted and shows only 1/3 of the data?

how could i tackle this

max bars in history / max bars in chart

solved it

I thought i had done that.

ok, moving on!

 

hihi friends


another issue here.


while multicurrency and multiTF EAs    DO calculate all market (21 pairs) ...one indicator (on which EA is build) is not calculating in the tester. Values dont change. What could go wrong with this?

Does this mean indicator should be custom designed as EA?

 
kavaro:

hihi friends


another issue here.


while multicurrency and multiTF EAs    DO calculate all market (21 pairs) ...one indicator (on which EA is build) is not calculating in the tester. Values dont change. What could go wrong with this?

Does this mean indicator should be custom designed as EA?

Tester only handles selected symbol, unless programmed to do otherwise, which is rarely the case.
 
Marco vd Heijden:
Tester only handles selected symbol, unless programmed to do otherwise, which is rarely the case.

I addressed this issue with this thread. And..pls check..we talked about EA trading on multicurrency field. And..it does take all market inside. It trades only selected pair, yes. But one could write the values/signals/what one wants in the log, also for other pairs.


While EA takes the same indicator in the calculation, seems indicator could work also in the tester. hm

 
kavaro:

I addressed this issue with this thread. And..pls check..we talked about EA trading on multicurrency field. And..it does take all market inside. It trades only selected pair, yes. But one could write the values/signals/what one wants in the log, also for other pairs.


While EA takes the same indicator in the calculation, seems indicator could work also in the tester. hm

Im not sure what you mean but the tester runs off the .hst file that is load into memory and then replayed in the tester.

Any indicator you call (in tester) will only see the datafeed from that particular pair that was selected in the tester all calls to other symbols will result in zero.

If you want to do multi symbol testing MT5 might be a better solution for this.

 
Marco vd Heijden:

Im not sure what you mean but the tester runs off the .hst file that is load into memory and then replayed in the tester.

Any indicator you call (in tester) will only see the datafeed from that particular pair that was selected in the tester all calls to other symbols will result in zero.

If you want to do multi symbol testing MT5 might be a better solution for this.

thanks Marco. hm, but talking to others and seeing EA work, i kindy doubt that. I hope you are wrong on this point. I thought only trades can be done on one pair. Calc can be done on several.

Would need second opinion on this one. As this thread goes, we saw that it is possible. also Stanislav confirmed this.

 
kavaro:

thanks Marco. hm, but talking to others and seeing EA work, i kindy doubt that. I hope you are wrong on this point. I thought only trades can be done on one pair. Calc can be done on several.

Would need second opinion on this one. As this thread goes, we saw that it is possible. also Stanislav confirmed this.

Can have a third or 4th opinion but it's just the way MT4 tester works.

You are simply mistaken the logic is obvious.

Writing orders to .cvs file and using that file to replay in other special expert is something entirely different then calling for extraterrestrial (non existent) symboldata in the tester process.

Like i pointed out before, MT5 may solve all of your problems.

Unless you write a EA that accesses all the .hst files simultaneously, but if your at that point, you would not need the tester at all...

 
kavaro:

while multicurrency and multiTF EAs    DO calculate all market (21 pairs) ...one indicator (on which EA is build) is not calculating in the tester. Values dont change. What could go wrong with this?

Does this mean indicator should be custom designed as EA?

It would be great to know more about the multicurrency indicator you refer to.

MT4 tester generates ticks for only one - work symbol, but OHLC prices for other symbols are available (on the history). At least on the current timeframe. The problem can be in mutitimeframeness. I did not try this.

 
//+------------------------------------------------------------------+
//|                                        Multi Currency Tester.mq4 |
//|         Copyright 2016,MarcovdHeijden, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016,MarcovdHeijden, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---

//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---

  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   for(int i=0;i<SymbolsTotal(1);i++)
     {
      Print("SYMBOL: ",SymbolName(i,1),
            " Open: ",iOpen(SymbolName(i,1),PERIOD_CURRENT,0),
            " High: ",iHigh(SymbolName(i,1),PERIOD_CURRENT,0),
            " Low: ",iLow(SymbolName(i,1),PERIOD_CURRENT,0),
            " Close: ",iClose(SymbolName(i,1),PERIOD_CURRENT,0),
            // However...
            " Ask: ",MarketInfo(SymbolName(i,1),MODE_ASK),
            " Bid: ",MarketInfo(SymbolName(i,1),MODE_BID));
     }
  }
//+------------------------------------------------------------------+
So, the closest you can get to a real world scenario would be to run it on M1 because then OHLC get's updated on a minute to minute basis.
Reason: