Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Indicatore Strategia Grezza Break Out //
- // breakMaxMinIntraD = (High0/Low0 Maggiore/Minore HighD0/LowD0 Session)
- // breakMaxMin = (Close Maggiore/Minore HighD1/LowD1)
- // breakCrossMaxMin = (Close Cross HighD1 LowD1)
- Input: breakMaxMinIntraD(true),
- breakMaxMinClose(false),
- sololong(false),
- soloshort(false);
- //-----------------------------------------------------------------------------------------------------------------------------------------------------//
- // BreakMaxMinIntraD //
- //-----------------------------------------------------------------------------------------------------------------------------------------------------//
- // Long E Short Insieme
- Begin;
- if breakMaxMinIntraD and not sololong and not soloshort then
- Buy("ENL BreakIntraD") next bar at highd(0) stop;
- if breakMaxMinIntraD and not sololong and not soloshort then
- Sellshort("ENS BreakIntraD") next bar at lowd(0) stop;
- End;
- // Solo Long
- Begin;
- if breakMaxMinIntraD and sololong and not soloshort then
- Buy("ENSL BreakIntraD") next bar at highd(0) stop;
- if breakMaxMinIntraD and sololong and not soloshort then
- Sell("EXSL BreakIntraD") next bar at lowd(0) stop;
- End;
- // Solo Short
- Begin;
- if breakMaxMinIntraD and soloshort and not sololong then
- Sellshort("ENSS BreakIntraD") next bar at lowd(0) stop;
- if breakMaxMinIntraD and soloshort and not sololong then
- Buytocover("EXSS BreakIntraD") next bar at highd(0) stop;
- End;
- //-----------------------------------------------------------------------------------------------------------------------------------------------------//
- // BreakMaxMinClose //
- //-----------------------------------------------------------------------------------------------------------------------------------------------------//
- // Long E Short Insieme
- Begin;
- if close > highd(1) and breakMaxMinClose and not sololong and not soloshort then
- Buy("ENL Break") next bar at market;
- if close < lowd(1) and breakMaxMinClose and not sololong and not soloshort then
- Sellshort("ENS Break") next bar at market;
- End;
- // Solo Long
- Begin;
- if close > highd(1) and breakMaxMinClose and sololong and not soloshort then
- Buy("ENSL Break") next bar at market;
- if close < lowd(1) and breakMaxMinClose and sololong and not soloshort then
- Sell("EXSL Break") next bar at market;
- End;
- // Solo Short
- Begin;
- if close < lowd(1) and breakMaxMinClose and soloshort and not sololong then
- Sellshort("ENSS Break") next bar at market;
- if close > highd(1) and breakMaxMinClose and soloshort and not sololong then
- Buytocover("EXSS Break") next bar at market;
- End;
- //-----------------------------------------------------------------------------------------------------------------------------------------------------//
- // Per I Plot Creare Un Nuovo Indicatore //
- //-----------------------------------------------------------------------------------------------------------------------------------------------------//
- //plot1(highD(0),"Plot High");
- //plot2(lowD(0),"Plot Low");
- //plot1(highD(1),"Plot High");
- //plot2(lowD(1),"Plot Low");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement