Download MetaTrader 5
To add comments, please log in or register
Have you installed MetaTrader 5? Find out more about it!
MisterDog
380
MisterDog 2014.03.27 00:39 

Shouldn't this line of code returned something other than zero?

Print("Stop level in points=",MarketInfo(Symbol(),MODE_STOPLEVEL));

For me it simply returning "0" rather than the minimum stop level. I thought perhaps the stop level really was 0, (OANDA is my broker) so I tried setting my stop very close to the current price but trade would not be accepted. Presumably this is because I violated the minimum stop level. Thoughts?

qjol
3243
qjol 2014.03.27 00:48  

MisterDog:

Thoughts?


Bug
James Hodges
2782
James Hodges 2014.03.27 01:05  

You may get a different result on a different server.. it may not be a metatrader thing .. it may be a broker's server thing. Give it a try and see...

I'll try it on a few servers too...

Update:

ok i tried it on a live ibfx and also got 0.0

however on fxdd demo i got 10.0....

MisterDog
380
MisterDog 2014.03.27 04:01  
qjol:

Bug


This works

double minStopVal = MarketInfo(Symbol(),MODE_STOPLEVEL);

Print("Stop level in points=",minStopVal);
if (minStopVal == 0)
{
   Print("bug");
   OpenChatWindow(OANDA);
   ChatType("What is the minimum stop value?");
   extern double minStopVal = 0.0005; // enter minimum stop value here
}


   
/
To add comments, please log in or register