1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| Sub DetectionPosition()
For ligne = 7 To 1800
If Sheets("RSI").Cells(ligne - 5, 9) = "Buy" And _
Sheets("MACD").Cells(ligne - 5, 8) = "Buy" And _
Sheets("AROON").Cells(5, ligne - 5) = "Buy" Then
Sheets("GENERAL").Range("A65536").End(xlUp).Offset(1, 0) = Sheets("AROON").Range("E" & ligne - 4).Value And _
Sheets("GENERAL").Range("A65536").End(xlUp).Offset(1, 0).Font.ColorIndex = 4 And _
Sheets("GENERAL").Range("B65536").End(xlUp).Offset(1, 0).Value = Sheets("AROON").Cells(5, ligne + 2).Value
If Sheets("RSI").Cells(ligne - 5, 9) = "Sell" And _
Sheets("MACD").Cells(ligne - 5, 8) = "Sell" And _
Sheets("AROON").Cells(5, ligne - 5) = "Sell" Then
Sheets("GENERAL").Range("A65536").End(xlUp).Offset(1, 0) = Sheets("AROON").Range("E" & ligne - 4).Value And _
Sheets("GENERAL").Range("A65536").End(xlUp).Offset(1, 0).Font.ColorIndex = 3 And _
Sheets("GENERAL").Range("B65536").End(xlUp).Offset(1, 0).Value = Sheets("AROON").Cells(5, ligne + 2).Value
End If
End If
Next ligne
End Sub |
Partager