EA31337/EA31337-strategies-sandbox

Improve calculation of risk

Opened this issue · 0 comments

You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
Account Balance * percent = RISK = |OrderOpenPrice - OrderStopLoss| * OrderLots * DeltaPerlot (Note OOP-OSL includes the SPREAD)
Do NOT use TickValue by itself - DeltaPerlot
You must normalize lots properly and check against min and max.
You must also check FreeMargin to avoid stop out

Ref: https://www.mql5.com/en/forum/113498