Download MetaTrader 5
To add comments, please log in or register
Interested in MQL5 features? Find them in documentation!
Juan Pablo Alonso Escobar
355
Juan Pablo Alonso Escobar 2011.10.03 19:30 

Hey guys,

My EA seems to be unable to get any last trade data (i.e. using SymbolInfoDouble(Symbol(),LAST_TRADE)) while running in the championship. I guess I should have used a fail safe with Bid/Ask information, but I didn't anticipate that the last trade data would fail. Back testing worked just fine, so I'm left wondering about the reason for this.

Is is a normal feature, or am I the only one with the issue?

 Thanks!

Documentation on MQL5: Market Info / SymbolInfoDouble
  • www.mql5.com
Market Info / SymbolInfoDouble - Documentation on MQL5
Rashid Umarov
Admin
6606
Rashid Umarov 2011.10.03 19:40  

What do you mean by LAST_TRADE? Can you provide a block of source for that from your EA?
Juan Pablo Alonso Escobar
355
Juan Pablo Alonso Escobar 2011.10.03 19:56  

Sorry, i meant SYMBOL_LAST. here is the actual piece of code:

string  symbol=Symbol();

double lastPrice=SymbolInfoDouble(symbol,SYMBOL_LAST);  

Rashid Umarov
Admin
6606
Rashid Umarov 2011.10.03 20:31  
JPAlonso:

Sorry, i meant SYMBOL_LAST. here is the actual piece of code:

string  symbol=Symbol();

double lastPrice=SymbolInfoDouble(symbol,SYMBOL_LAST);  

Why did you decide that this approach is correct?
Juan Pablo Alonso Escobar
355
Juan Pablo Alonso Escobar 2011.10.03 22:26  
Rosh:
Why did you decide that this approach is correct?

I assumed that the last deal would be a relevant price to be considered. I follow the same approach with equity trading (where bid/spreads alone can generate inaccurate estimates of the fair price).

In this case, since the spread for EUR/USD is usually so small, i felt that the choice between last deal and bid/ask would be insignificant, so i didn't even bother accounting for bid/ask prices. Does the championship not consider broad trades/volume when feeding data? 

Thank you for the information!

Rashid Umarov
Admin
6606
Rashid Umarov 2011.10.03 23:24  

Last deal is not eligible for forex instruments because there is not central exchange spot. We don't translate this parameter on the championship due absence of that one.
Juan Pablo Alonso Escobar
355
Juan Pablo Alonso Escobar 2011.10.03 23:29  

Thank you Rosh!

Yeah, that does make sense for the championship environment. I got too used to aggregate last deal data from live trading, shame on me. Well, Ill be back next year.

Cheers! 

Fivos S. Georgiades
872
Fivos S. Georgiades 2012.11.12 10:39  
JPAlonso:

Thank you Rosh!

Yeah, that does make sense for the championship environment. I got too used to aggregate last deal data from live trading, shame on me. Well, Ill be back next year.

Cheers! 

And back you are Alonso, very nicely heading the ATC2012.

Would you please fulfill your profile on MQL5.com, as a leader on ATC2012 you already getting a lot of interest from mql5 people wanting to buy your EA.

I would also suggest you to register also as a seller for Signal Subscription and Market.

Good luck on the rest of the Championship!

/
To add comments, please log in or register