Hello,
Is it possible to put the SL in Breakeven when it reaches a technical indicator?
Example :
– I buy when the price bounces on the lower bollinger band
– I place my SL under the most recent low
– I target as TP the upper bollinger band
Is it possible to move the SL to breakeven when the price reaches the SMA20?
You can place orders to sell at any price using pending STOP and LIMIT orders. So just check if your SMA condition has been met and then set a flag and send a pending order to sell at TRADEPRICE for every bar while the flag is true. Reset the flag once NOT ONMARKET.
Hello @vonasi, thank you, I tried to put a flag for the condition (close>=SMA20 ), in order to move the SL to breakeven.
But I think there’s a mistake in my coding.
Can you help me?
LIMIT sells at a better price than the current close whereas STOP sells at an inferior price than the current close so you are using the wrong instruction.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue