Noob help please SL and TS
- This topic has 6 replies, 3 voices, and was last updated 2 months ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
Similar topics:
Forums › ProRealTime English forum › ProBuilder support › Noob help please SL and TS
Hi All,
Im hoping someone can help a new starter in this field. Ive created a (very) basic auto trade system but it wont allow me to have both a Stop Loss and Trailing stop. Looking at other forum posts for a few hours I can see this is a common issue. Ive found some scripts created by other then enable this feature but dont understand how I can incorporate this into my own script?
Appreciate this is a very cheeky ask, but would someone please amend my code so I have both a stop loss (20 points/pips) and a Trailing stop (5 points/pips) that I can run. Thanks in advance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
// Definition of code parameters DEFPARAM CumulateOrders = False // Cumulating positions deactivated // Conditions to enter long positions indicator1 = BollingerDown[17](close) c1 = (close CROSSES OVER indicator1) IF c1 THEN BUY 1 PERPOINT AT MARKET ENDIF // Conditions to exit long positions indicator2 = BollingerUp[17](close) c2 = (close CROSSES UNDER indicator2) IF c2 THEN SELL AT MARKET ENDIF // Stops and targets SET STOP pLOSS 20 pTRAILING 5 |
Hi Bob,
Try this…
TimeFrame: 15 minuten
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
// Definition of code parameters DEFPARAM CumulateOrders = False // Cumulating positions deactivated // Conditions to enter long positions indicator1 = BollingerDown[17](close) c1 = (close CROSSES OVER indicator1) IF c1 THEN BUY 1 PERPOINT AT MARKET ENDIF // Conditions to exit long positions indicator2 = BollingerUp[17](close) c2 = (close CROSSES UNDER indicator2) IF c2 THEN SELL AT MARKET ENDIF // Stops and targets SET STOP pLOSS 30 SET STOP PTRAILING 85 |
BTW,
your trail stop must be larger than your stop loss, otherwise only the trail stop works, so your position to be closed always ends up at your trail stop.
Hi JS,
Does a trailingstop and a stoploss work together in your systems? Beacause I have found out, that it isn’t the case, see my post in the Pro order support.
Thnx!
Hi,
I don’t use them together in my systems, I just use a “(custom) trailing stop” in IB…
(I would make the “StopLoss” part of the TS myself…)
Find exclusive trading pro-tools on