Download MetaTrader 5
To add comments, please log in or register
Speed up MQL5 Cloud Network. Install Strategy Tester Agent!
Peter Williams
342
Peter Williams 2014.06.19 15:10 

I hav erecently go some invalid stops occurring (Error 130) so thought I'd try the Market info stoplevel command as shown below.

I just seem to be getting a value of zero 0.00000000 to be precise.

The following code is the 'entire' EA

I expect to return a integer number of points.


void OnTick()
{  double MinStopLevel ;
   MinStopLevel   = MarketInfo(Symbol(),MODE_STOPLEVEL);
   string myc = "MinStopLevel = "+DoubleToString(MinStopLevel,8);
   Comment(myc);
}
Drazen Penic
2408
Drazen Penic 2014.06.19 15:22  

Just tested your code as is and it works for me at three brokers for forex, cfd and futures.

Call your broker's support.

Peter Williams
342
Peter Williams 2014.06.19 15:38  
drazen64:

Just tested your code as is and it works for me at three brokers for forex, cfd and futures.

Call your broker's support.

Thanks - just to show case - here is image of screen.

Will contact ALPARI

Few minutes later - spoken to Alpari - don't think they even understood the question!

Certainly unable to provide any meaningful suggestions

One question I was asked ".. was the person who ran the EA ( -- drazen64 -- ) using a different type of account...." 

The answer to which I have no idea (I am using MT4 / Alpari demo account - other Market info statements appear to work Mode_ask, Mode_Bid, Mode_Spread etc

Temporarily STUMPED again!

Tried on another Broker - Hirose - and appears to work fine !!

EA showing StopLevel
/
To add comments, please log in or register