Advertisement
Maurizio-Ciullo

Indicatore Strategia Grezza Break Out

Jan 21st, 2023 (edited)
1,197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                
  2.                                      // Indicatore Strategia Grezza Break Out //
  3.                                      
  4. // breakMaxMinIntraD = (High0/Low0 Maggiore/Minore HighD0/LowD0 Session)                                    
  5. // breakMaxMin = (Close Maggiore/Minore HighD1/LowD1)
  6. // breakCrossMaxMin = (Close Cross HighD1 LowD1)  
  7.      
  8. Input: breakMaxMinIntraD(true),
  9.        breakMaxMinClose(false),
  10.        sololong(false),
  11.        soloshort(false);
  12.  
  13.  
  14. //-----------------------------------------------------------------------------------------------------------------------------------------------------//
  15.                                                // BreakMaxMinIntraD //
  16. //-----------------------------------------------------------------------------------------------------------------------------------------------------//                                              
  17.  
  18. // Long E Short Insieme                                                    
  19. Begin;  
  20. if breakMaxMinIntraD and not sololong and not soloshort then                                                  
  21. Buy("ENL BreakIntraD") next bar at highd(0) stop;    
  22. if breakMaxMinIntraD and not sololong and not soloshort then                
  23. Sellshort("ENS BreakIntraD") next bar at lowd(0) stop;
  24. End;
  25. // Solo Long
  26. Begin;  
  27. if breakMaxMinIntraD and sololong and not soloshort then                                                  
  28. Buy("ENSL BreakIntraD") next bar at highd(0) stop;  
  29. if breakMaxMinIntraD and sololong and not soloshort then                
  30. Sell("EXSL BreakIntraD") next bar at lowd(0) stop;
  31. End;
  32. // Solo Short
  33. Begin;  
  34. if breakMaxMinIntraD and soloshort and not sololong then                                                  
  35. Sellshort("ENSS BreakIntraD") next bar at lowd(0) stop;  
  36. if breakMaxMinIntraD and soloshort and not sololong then                  
  37. Buytocover("EXSS BreakIntraD") next bar at highd(0) stop;
  38. End;
  39.  
  40.  
  41. //-----------------------------------------------------------------------------------------------------------------------------------------------------//
  42.                                                // BreakMaxMinClose //
  43. //-----------------------------------------------------------------------------------------------------------------------------------------------------//                                              
  44.  
  45. // Long E Short Insieme                                                  
  46. Begin;                                    
  47. if close > highd(1) and breakMaxMinClose and not sololong and not soloshort then                  
  48. Buy("ENL Break") next bar at market;
  49. if close < lowd(1) and breakMaxMinClose and not sololong and not soloshort then                      
  50. Sellshort("ENS Break") next bar at market;
  51. End;
  52. // Solo Long
  53. Begin;                                          
  54. if close > highd(1) and breakMaxMinClose and sololong and not soloshort then                                                                    
  55. Buy("ENSL Break") next bar at market;  
  56. if close < lowd(1) and breakMaxMinClose and sololong and not soloshort then                                          
  57. Sell("EXSL Break") next bar at market;
  58. End;
  59. // Solo Short
  60. Begin;                                          
  61. if close < lowd(1) and breakMaxMinClose and soloshort and not sololong then                                          
  62. Sellshort("ENSS Break") next bar at market;
  63. if close > highd(1) and breakMaxMinClose and soloshort and not sololong then                                          
  64. Buytocover("EXSS Break") next bar at market;
  65. End;
  66.  
  67.  
  68. //-----------------------------------------------------------------------------------------------------------------------------------------------------//              
  69.                                                 // Per I Plot Creare Un Nuovo Indicatore //
  70. //-----------------------------------------------------------------------------------------------------------------------------------------------------//                                                          
  71.  
  72. //plot1(highD(0),"Plot High");
  73. //plot2(lowD(0),"Plot Low");
  74. //plot1(highD(1),"Plot High");
  75. //plot2(lowD(1),"Plot Low");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement