Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Indicatore Uscite Multiple TK-SL Distanziati Dal Prezzo D'ingresso //
- // Esempio Ingresso 2 Contratti E Uscita Con 2 Tk O 2 SL Con 1 Contratto Fino Alla Chiusura Della Posizione //
- vars: open_long(false);
- open_long = (close > open) and (close[1] > open [1]);
- // Open Long
- if marketposition = 0 then
- Begin;
- if open_long then
- Buy("Entry") 2 Contract next bar at market;
- End;
- // Close Long
- if marketposition = 1 then
- Begin;
- Sell ("1mo TK") from entry ("Entry") 1 Contract Next Bar at Entryprice + 0.00090 limit;
- Sell ("2do TK") from entry ("Entry") 1 Contract Next Bar at Entryprice + 0.00120 limit;
- Sell ("1mo SL") from entry ("Entry") 1 Contract Next Bar at Entryprice - 0.00090 stop;
- Sell ("2do SL") from entry ("Entry") 1 Contract Next Bar at Entryprice - 0.00120 stop;
- End;
- // Close Long
- {if marketposition = 1 then
- Begin;
- Sell ("1mo TK") from entry ("Entry") 1 Contract Next Bar at Entryprice + 0.00090 limit;
- Sell ("2do TK") from entry ("Entry") 1 Contract Next Bar at Entryprice + 0.00820 limit;
- Sell ("1mo SL") from entry ("Entry") 1 Contract Next Bar at Entryprice - 0.00090 stop;
- Sell ("2do SL") from entry ("Entry") 1 Contract Next Bar at Entryprice - 0.00120 stop;
- End;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement