automated trading - code vba 6


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



Copy this code and paste it in your HTML
  1. If ((ibuy = 0) And (isell = 0)) Then
  2.  
  3. itradeb = shtTrading.Range("itrade").Value + 1
  4.  
  5. If ((itrade = 7)) Then
  6. sum = shtTrading.Range("D2").Cells(1, 1).Value
  7. sum = sum + shtTrading.Range("D2").Cells(2, 1).Value
  8. sum = sum + shtTrading.Range("D2").Cells(3, 1).Value
  9. sum = sum + shtTrading.Range("D2").Cells(4, 1).Value
  10. sum = sum + shtTrading.Range("D2").Cells(5, 1).Value
  11. sum = sum + shtTrading.Range("D2").Cells(6, 1).Value
  12. sum = sum + shtTrading.Range("D2").Cells(7, 1).Value
  13.  
  14. If (shtTrading.Range("D2").Cells(1, 1).Value < 0#) And _
  15. (shtTrading.Range("D2").Cells(2, 1).Value < 0#) And _
  16. (shtTrading.Range("D2").Cells(3, 1).Value < 0#) And _
  17. (shtTrading.Range("D2").Cells(4, 1).Value < 0#) And _
  18. (shtTrading.Range("D2").Cells(5, 1).Value < 0#) And _
  19. (shtTrading.Range("D2").Cells(6, 1).Value < 0#) And _
  20. (shtTrading.Range("D2").Cells(7, 1).Value < 0#) And _
  21. (sum > -150#) Then
  22. 'ibreak = 1
  23. End If
  24. End If

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.