Advertisement
Maurizio-Ciullo

Indicatore Non Aggiornare Stop

Feb 18th, 2023 (edited)
690
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3.                                                // Indicatore Non Aggiornare Stop 2 Modi Per Realizzarlo //
  4.                                         // Lo Short Del 2ndo Modo Non Funziona Ci Deve Essere Un Bug !!! //
  5.    
  6. //https://www.youtube.com/watch?v=-J9tuRhe3-U&t=78s        
  7.        
  8.        
  9. // ------------------------------------ INIZIO INDICATORE NON AGGIORNARE STOP 1 MODO ------------------------------------ //       
  10.    
  11. var: myStopLong(0), myStopShort(0);
  12.        
  13. // Long
  14. myStopLong = lowd(0);
  15. print(myStopLong);
  16.  
  17. // Short
  18. myStopShort = highd(0);
  19. print(myStopShort);
  20.    
  21. // Clear the print log when the strategy first applyed or refreshed
  22. Once Clearprintlog;
  23.  
  24. //Entry Long                                               
  25. {If close[1] > open[1] and close > open Then
  26.     Begin;
  27.     buy ("ENL BreakIntraD") next bar at highd(0) stop;
  28.     End;
  29. Sell from entry ("ENL BreakIntraD") next bar at myStopLong[Barssinceentry] stop;}
  30.  
  31. //Entry Short                                              
  32. If close[1] < open[1] and close < open Then
  33.     Begin;
  34.     sellshort ("ENS BreakIntraD") next bar at lowd(0) stop;
  35.     End;
  36. Buytocover from entry ("ENS BreakIntraD") next bar at myStopShort[Barssinceentry] stop;
  37.  
  38.  
  39. // ------------------------------------ FINE INDICATORE NON AGGIORNARE STOP 1 MODO ------------------------------------ //     
  40.        
  41.  
  42. // ------------------------------------ INIZIO STUDY NON AGGIORNARE STOP 1 MODO ------------------------------------ //
  43.  
  44. //plot1(highd(0), "highd0");
  45. //plot2(lowd(0), "lowd0");
  46.  
  47. // ------------------------------------ FINE STUDY NON AGGIORNARE STOP 1 MODO ------------------------------------ //
  48.  
  49.            
  50. // ------------------------------------ INIZIO INDICATORE NON AGGIORNARE STOP 2 MODO------------------------------------ //
  51.                                // Lo Short Del 2ndo Modo Non Funziona Ci Deve Essere Un Bug !!! //
  52.  
  53. {var: myStopLong(0), myStopShort(0);
  54. var: MP(0);
  55. MP = Marketposition;}
  56.  
  57. // Clear the print log when the strategy first applyed or refreshed
  58. //Once Clearprintlog;
  59.  
  60. // Long
  61. {if MP[1] = 0 and MP = 1 then
  62.     myStopLong2 = lowd(0);
  63. if  MP[1] = 0 and MP = 0 then
  64.     myStopLong = 0;
  65.     print(myStopLong);}
  66.    
  67. // Short   
  68. {if MP[1] = 0 and MP = -1 then
  69.     myStopShort = highd(0);
  70. if  MP[1] = 0 and MP = 0 then
  71.     myStopShort = 0;
  72.     print(myStopShort);}           
  73.            
  74.                                                
  75. //Entry Long                                               
  76. {If close[1] > open[1] and close > open Then
  77.     Begin;
  78.     buy ("ENL BreakIntraD") next bar at highd(0) stop;
  79.     End;
  80. Sell from entry ("ENL BreakIntraD") next bar at myStopLong stop;}
  81.  
  82. //Entry Short                                              
  83. {If close[1] < open[1] and close < open Then
  84.     Begin;
  85.     sellshort ("ENS BreakIntraD") next bar at lowd(0) stop;
  86.     End;
  87. Buytocover from entry ("ENS BreakIntraD") next bar at myStopShort stop;}
  88.  
  89.  
  90. // ------------------------------------ FINE INDICATORE NON AGGIORNARE STOP 2 MODO------------------------------------ //
  91.  
  92.    
  93. // ------------------------------------ INIZIO STUDY NON AGGIORNARE STOP 2 MODO ------------------------------------ //
  94.  
  95. // Long
  96. {var: myStop(0), MP(0);
  97.  
  98. MP = I_Marketposition;
  99.  
  100.  
  101. plot1(MP);
  102.  
  103. if MP[1] = 0 and MP = 1 then
  104.     myStop = lowd(0);
  105.     plot2(myStop);}
  106.    
  107. // Short
  108. {var: myStop(0), MP(0);
  109.  
  110. MP = I_Marketposition;
  111.  
  112.  
  113. plot1(MP);
  114.  
  115. if MP[1] = 0 and MP = -1 then
  116.     myStop = highd(0);
  117.     plot3(myStop);}
  118.    
  119.    
  120. // ------------------------------------ FINE STUDY NON AGGIORNARE STOP 2 MODO ------------------------------------ //  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement