I have this simple piece, but I found this difference on the tester. Can I use symbolinfo object during tester? Or is it this object only applies to current?
The result is:
2011.10.26 15:17:13 Core 1 2011.10.24 00:59:59 Obj Price = 0 Price= 1.38467
2011.10.26 15:17:13 Core 1 2011.10.24 00:59:40 Obj Price = 0 Price= 1.38467
2011.10.26 15:17:13 Core 1 2011.10.24 00:59:20 Obj Price = 0 Price= 1.38481
2011.10.26 15:17:13 Core 1 2011.10.24 00:59:00 Obj Price = 0 Price= 1.3848
2011.10.26 15:17:13 Core 1 2011.10.24 00:58:59 Obj Price = 0 Price= 1.38476
2011.10.26 15:17:13 Core 1 2011.10.24 00:58:40 Obj Price = 0 Price= 1.38469
I think you have to refresh the object first:
mysymbol.RefreshRates()
tried that in this simpler script. doesnt work.... thx anyway for your response.
#include <Trade\SymbolInfo.mqh> //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { //--- CSymbolInfo *mysymbol=new CSymbolInfo; mysymbol.RefreshRates(); Alert("tst ",mysymbol.Name()); return; }
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have this simple piece, but I found this difference on the tester. Can I use symbolinfo object during tester? Or is it this object only applies to current?
The result is:
2011.10.26 15:17:13 Core 1 2011.10.24 00:59:59 Obj Price = 0 Price= 1.38467
2011.10.26 15:17:13 Core 1 2011.10.24 00:59:40 Obj Price = 0 Price= 1.38467
2011.10.26 15:17:13 Core 1 2011.10.24 00:59:20 Obj Price = 0 Price= 1.38481
2011.10.26 15:17:13 Core 1 2011.10.24 00:59:00 Obj Price = 0 Price= 1.3848
2011.10.26 15:17:13 Core 1 2011.10.24 00:58:59 Obj Price = 0 Price= 1.38476
2011.10.26 15:17:13 Core 1 2011.10.24 00:58:40 Obj Price = 0 Price= 1.38469