how to properly check if SL or/and TP is set?
how to properly check if SL or/and TP is set?
05 Aug 2016, 19:41
Hello,
Sometimes the StopLoss is not set when opening a trade (quite less often the TakeProfit too), and these are like 10 pips away so nothing extreme there.
My question is, how do I properly check if SL/TP is in place when a trade is running? I don't need to check if they are set the correct distance away from entry price, only if they are running for now.
what I did for check was to
//
bool isStopLossRunning;
if (StopLoss != 0)
{
isStopLossRunning = true;
Print("SL is in place");
}
else
{
Print("SL is NOT RUNNING");
}
//
but I guess this is not quite the proper way to do it.
Also, IF one of them SL/TP is not running, how do I set them?
Thanks in advance.
... Deleted by UFO ...