Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // (Ingressi A Fasce Di Prezzo)
- //@version=4
- strategy(title="6 Buy and Sell a delle fascie di prezzo specifico",
- overlay=true,
- pyramiding=100,
- initial_capital=1000,
- default_qty_type=strategy.percent_of_equity,
- default_qty_value=20,
- commission_type=strategy.commission.cash_per_order,
- commission_value=1,
- slippage=2,
- default_qty_type=strategy.percent_of_equity,
- default_qty_value=1000)
- //Input fasce di prezzo
- Inp_Long_Sup=input(defval=0.9815)
- Inp_Long_Inf=input(defval=0.9692)
- Inp_Exit_Sup=input(defval=1.0310)
- Inp_Exit_Inf=input(defval=1.0158)
- //Visualizzazione plot deisegnato in aree non riuscito
- //plot(Inp_Long_Sup, color=color.green, style=plot.style_area)
- //plot(Inp_Long_Inf, color=color.white, style=plot.style_area)
- //plot(Inp_Long_Sup, color=color.red, style=plot.style_area)
- //plot(Inp_Exit_Inf, color=color.white, style=plot.style_area)
- //Condizioni di entrata
- Cond_Entry_Long=close > Inp_Long_Inf and close < Inp_Long_Sup
- Cond_Exit_Long=close > Inp_Exit_Inf and close < Inp_Exit_Sup
- //Stop loss da mettere per imparare
- //Ordine entry ed exit
- strategy.entry("Compra", true, when=Cond_Entry_Long)
- strategy.close("Compra", when=Cond_Exit_Long)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement