Take profit stop loss ratio
-
Hello everyone, I would like to establish a parameter, so that it does not open pending operations in case the relationship stop losse, take profit is less than 1/1. Can you think of the best way to do it?
The problem that arises is that I understand that before the pending operation is placed, you cannot measure the relationship between stop and take profit, so I understand that you must first place the pending operation, and then review the parameters in relation to tp , sl.
What would be the optimal way to parameterize the minimum 1/1 ratio to allow it to open pending operations, or eliminate these?
Thanks in advance!
-
@traderline The easiest way is guarantiing that the TP distance in pips will alway be bigger than the SL distance in pips. You can create two variables (two numbers) and compare them before the order is programmed. The number for the TP level should always be bigger than the SL as a condition. If it is not true, no pending order is programmed.