Advertisement
Maurizio-Ciullo

Bot 22 57 PortTS_Rotazioni_Criteri_Selezione _PT_III

Apr 16th, 2024
645
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Vedi Video Lezione Quant: 57 PortTS_Rotazioni_Criteri_Selezione _PT_III
  2.  
  3. La strategia usa data 1 e data 2 di:  SP500 60 Min Data1 E 1440 Data 2 Min
  4.  
  5. inputs: stoopL(1200)
  6.  
  7. If close of data2 < low[1] of data2 and close of data1 < BollingerBand(close, 20, -2) then buy 2 shares next bar at market;
  8.  
  9. if close >= Average(close, 20) and marketposition > 0 then sell 1 shares next bar at market;
  10.  
  11. of close >= BollingerBand(close, 20, 2) and marketposition > 0 then sell 1 shares next bar at market;
  12.  
  13. if dayofweek(date) = 5 and marketposition > 0 then setexitonclose;
  14.  
  15. setstoploss(stopL);
  16. QTA_exportDataStrategy("MR", 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement