excel VBA looping
I can run the program but the looping does not seem to work. Is there a suggestion to how the program should be written.
If Worksheets("INPUTS").Cells(41, "C").value = ("X") And _
EffRatio > Worksheets("INPUTS").Cells(42, "C") Then
'Only enter trade when ratio is not trending
tradeSignalMessage = "No Signal"
orderSide = ""
ElseIf Worksheets("INPUTS").Cells(30, "C").value = ("X") And _
ROCofPoly > Worksheets("INPUTS").Cells(32, "B") Then
'double a long position
tradeSignalMessage = "DOUBLE LONG"
orderSide = "BUY"
orderPrice = doubleLongLevel
ElseIf Worksheets("INPUTS").Cells(37, "C").value = ("X") And _
KAMA < EMA Then
'double a long position
tradeSignalMessage = "DOUBLE LONG"
orderSide = "BUY"
orderPrice = doubleLongLevel
ElseIf Worksheets("INPUTS").Cells(45, "C").value = ("X") And _
TrueStrengthIndicator > TSIBuy1 Then
'double a long position
tradeSignalMessage = "DOUBLE LONG"
orderSide = "BUY"
orderPrice = doubleLongLevel
Else
tradeSignalMessage = "DOUBLE LONG"
orderSide = "BUY"
orderPrice = doubleLongLevel
End If
Recent comments
5 years 41 weeks ago
6 years 27 weeks ago
6 years 39 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 48 weeks ago
7 years 4 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago