Advertisement
Maurizio-Ciullo

Indicatore Test Daily Mensile Buy Sell

Dec 22nd, 2022 (edited)
655
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Unger Miglior Giorno Per Andare A Mercato Sul Mensile
  2. // Ottimizzazione da 1 a 31, i giorni di chiusura mercato saranno saltati, usa il plot sotto per vedere i giorno del mese
  3. // Mettere input a 0 per escludere o long o short
  4. // Timeframe Giornaliero
  5. // Se Ottimizzati Insieme I Risultati Cambiano Del Farlo Separatamente Per Poi Unirli Alla Fine
  6.  
  7.         // Attenzione l'acquisto è alla candela successiva quindi anche se giorno 1 è entrerà a mercato giorno 2 etc... !!! //
  8.  
  9. // Long
  10.  
  11. Input:
  12.     My_TDOM_Long(1);
  13.    
  14. if Dayofmonth(Date) = My_TDOM_Long and Marketposition = 0 then begin
  15. buy next bar at Market;
  16. end;
  17. if Marketposition = 1 then sell next bar at market;
  18.  
  19. // Short
  20.  
  21. Input:
  22.     My_TDOM_Short(1);
  23.    
  24. if Dayofmonth(Date) = My_TDOM_Short and Marketposition = 0 then begin
  25. Sellshort next bar at Market;
  26. end;
  27. if Marketposition = -1 then Buytocover next bar at market;
  28.  
  29.  
  30.                                     // Creare un indicatore per plottare i giorni //
  31.  
  32. //plot1(Dayofmonth(Date));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement