Hallo Forum,
I need your help.
I want to programm the following code below, but if I reached for example an Ordersize of 3, I want to hold the Ordersize until the strategyprofit is >0 or the loss is higher and I have to increase the Ordersize. If the strategyprofit reduce I want to hold the maximum reached Ordersize until the strategyprofit is > 0.
I hope you can help me.
If strategyprofit >= 0 Then
OrderSize = 1
Elsif strategyprofit <= -200 Then
OrderSize = 5
Elsif strategyprofit <= -150 Then
OrderSize = 4
Elsif strategyprofit <= -100 Then
OrderSize = 3
Elsif strategyprofit <= -50 Then
OrderSize = 2
Endif