Exit the trade using a trailing stop of a close below either the 10 MA or 20 MA (user choice) on that larger timeframe as the position moves in your favor (i.e. whenever position price rises above the MA). This is one area where this script could use a little work or some human intervention - when the trade is entered right in the vicinity of the moving averages, you get some whipsaw. Not sure how to avoid that at this point though if you want to look at those longer term moving averages as your exit criteria.
Option of using daily ATR as a measure of finding contracting ranges and ensuring a decent risk/reward. (If the difference between the breakout point and your stop level is below a certain % of ATR, it could possibly find those consolidating periods.)
Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.
Profit targets on the other hand do make sense. That is actually something I have been thinking of. I want to add the ability to take partial profits (user configurable) and let the rest ride. Not sure how long that will take me though as I'm not 100% sure how to do it, but I'll probably be adding that feature in the near future.