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 34 weeks ago
6 years 20 weeks ago
6 years 32 weeks ago
6 years 35 weeks ago
6 years 36 weeks ago
6 years 42 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago