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 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago