automated trading - code vba 4


/ Published in: Visual Basic
Save to your folder(s)



Copy this code and paste it in your HTML
  1. '----------------------------
  2. '----------------------------
  3. ' Base strategy
  4. '----------------------------
  5. '----------------------------
  6.  
  7. ' cond_buy_buystrategy
  8. cond_buy_buystrategy = _
  9. (xmean_2 > xmean_3) And _
  10. (slopexmean_2 > SIMML2) And _
  11. (slopexmean_4 > SIMML4) And _
  12. (slopexmean_6 > SIMML6)
  13.  
  14. ' cond_break_buystrategy
  15. cond_break_buystrategy = _
  16. (xmean_2 < xmean_3) And _
  17. (slopexmean_1 < SIMML1E) And _
  18. (slopexmean_2 < SIMML2E) And _
  19. (slopexmean_6 < SIMML6E)
  20.  
  21. ' cond_sell_sellstrategy
  22. cond_sell_sellstrategy = _
  23. (xmean_2 < xmean_3) And _
  24. (slopexmean_1 < SIMML1S) And _
  25. (slopexmean_3 < SIMML3S) And _
  26. (slopexmean_6 < SIMML6S)
  27.  
  28. ' cond_break_sellstrategy
  29. cond_break_sellstrategy = _
  30. (slopexmean_3 > SIMML3ES) And _
  31. (slopexmean_5 > SIMML5ES)

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.