They've had server issues for the first time in aggggggges today actually. So the server has been down and out for 30 minutes. Quite frustrating as I missed a great short on cable.
Maybe that has messed it up?
For future reference, how can I build this issue into my algorithm if this happens again? I.e. if the MarketInfo gets scrambled temporarily and returns unusable or irrelevant numbers?
I'm now getting a ticksize and value on my windows MT4 FXCM platform (same account) BUT I am not getting a value on my VPS MT4 FXCM platform within my VPS!? What the heck is going on! They're the same account, version, broker etc.!
Account Balance * percent = RISK = (OrderOpenPrice - OrderStopLoss)*DIR * OrderLots * DeltaPerlot (Note OOP-OSL includes the SPREAD)
Do NOT use TickValue by itself - DeltaPerlot
Therefor it must be
pips_to_bsl / ( tv / ts )
or the original
pips_to_bsl / ts / tv
But pips_tl_bsl had better not be pips. It must be a change of price (0.0200 not 200 pips)
zero divide error on demo testing but not ST?
Were are you setting those variables? It says somewhere that the values should be retrieved in OnStart not in OnInit()
Zero divide was from brokers server side issue. It's since been resolved. It was because ticksize was "0" for a bit whilst a trade was being placed. Therefore the lots formula was dividing by a "0".
I've read your DeltaPerLot thread before but tbh don't really understand it. Just a little slow tbh.
pips_to_bsl / ts / tv // works
pips_to_bsl / ( tv / ts ) // doesn't work - errors
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
They've had server issues for the first time in aggggggges today actually. So the server has been down and out for 30 minutes. Quite frustrating as I missed a great short on cable.
Maybe that has messed it up?
For future reference, how can I build this issue into my algorithm if this happens again? I.e. if the MarketInfo gets scrambled temporarily and returns unusable or irrelevant numbers?
Try SymbolInfoDouble("USDCAD",SYMBOL_TRADE_TICK_SIZE) and ask your broker may be the server is not correct?
Ok so this still returns "0"....
Wow this has completely stopped my trading.
So none of the markets on FXCM platform are returning a tick size. Some are not even returning the tick value either (facepalm). Disaster.
How can I synthetically formulate these values?
1) Talk to your broker!
2) Try Print("Tick size in points=",MarketInfo(Symbol(),MODE_TICKSIZE)," ",_Point);
Wow this is chaos. FXCM is having MAJOR issues over the past hour+. They're offline again.
If I could talk to my broker that would be great! Impossible to get through. I'd imagine everyone is going mental right about now.
Is there not a way for me to produce these values rather than depend upon the brokers server information?
Account Balance * percent = RISK = (OrderOpenPrice - OrderStopLoss)*DIR * OrderLots * DeltaPerlot (Note OOP-OSL includes the SPREAD) Do NOT use TickValue by itself - DeltaPerlot
Therefor it must be
or the originalzero divide error on demo testing but not ST?
Zero divide was from brokers server side issue. It's since been resolved. It was because ticksize was "0" for a bit whilst a trade was being placed. Therefore the lots formula was dividing by a "0".
I've read your DeltaPerLot thread before but tbh don't really understand it. Just a little slow tbh.
a bit math: a / b / c = a*c/b (you don't even need brackets) :)
it saves a zero-devide-check!