/ Published in: Visual Basic
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
If ((ibuy = 0) And (isell = 0)) Then itradeb = shtTrading.Range("itrade").Value + 1 If ((itrade = 7)) Then sum = shtTrading.Range("D2").Cells(1, 1).Value sum = sum + shtTrading.Range("D2").Cells(2, 1).Value sum = sum + shtTrading.Range("D2").Cells(3, 1).Value sum = sum + shtTrading.Range("D2").Cells(4, 1).Value sum = sum + shtTrading.Range("D2").Cells(5, 1).Value sum = sum + shtTrading.Range("D2").Cells(6, 1).Value sum = sum + shtTrading.Range("D2").Cells(7, 1).Value If (shtTrading.Range("D2").Cells(1, 1).Value < 0#) And _ (shtTrading.Range("D2").Cells(2, 1).Value < 0#) And _ (shtTrading.Range("D2").Cells(3, 1).Value < 0#) And _ (shtTrading.Range("D2").Cells(4, 1).Value < 0#) And _ (shtTrading.Range("D2").Cells(5, 1).Value < 0#) And _ (shtTrading.Range("D2").Cells(6, 1).Value < 0#) And _ (shtTrading.Range("D2").Cells(7, 1).Value < 0#) And _ (sum > -150#) Then 'ibreak = 1 End If End If