Stop loss below/above the open position candle
- This topic has 5 replies, 4 voices, and was last updated 2 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
Similar topics:
Forums › ProRealTime English forum › ProOrder support › Stop loss below/above the open position candle
There you go:
1 2 3 4 5 6 7 8 9 10 11 12 |
IF Not OnMarket THEN // LONG entry IF MyLongConditions THEN BUY 1 CONTRACT AT MARKET SET STOP PRICE (low - 1*PipSize) ENDIF // SHORT entry IF MyShortConditions THEN SELLSHORT 1 CONTRACT AT MARKET SET STOP PRICE (high + 1*PipSize) ENDIF ENDIF |
Maybe as a supplement…
A (classic) “Set Stop Loss” is always calculated from the (average) price at which the position is opened…
Set Stop pLoss 10 will place a stop loss of 10 points/pips below the purchase price of your “long” position or 10 points/pips above the purchase price of your “short” position…
If you don’t want to use points/pips but prefer a price level, you can use “Set Stop Price”…
Set Stop Price Low will place a stop loss on the price level of the “Low” of the previous candle…
Set Stop Price High will place a stop loss at the price level of the “High” of the previous candle…
Thank you for both messages! Now it’s clear.
I would also like to understand how to set a take profit order when a certain price level is touched and not after the bar/candle is closed.
For example, I would like to set the take profit order as soon as the MA20 is touched.
Hi Niklas, thanks for your answer.
IG minimum distance for the stop order isn’t a problem so far since I’m only using probacktest to test strategies, I do not use automatic trading now.
So, can you make an example on how to use “set plimit X” with an indicator, as an example the MA20?
Also, if possible I’d like to experiment with targets which are multiples of the stop loss. For a long position that would be, assuming I enter on the close of the bar, CLOSE-LOW. How the formula would be written in the code?
Find exclusive trading pro-tools on