i though that if you do () in those brackets it refers to the current order... the order selected earlier in the code. I can't stare at the code for hours. That would be completely inefficient j/k. Ok i read how to do a print statement and i seel what you mean. Sorry for the misunderstanding, I'm a beginner and don't really know the terms. I thought you meant printing the errorlog. I will print all the variables and post again. Thank you for all of your help.
Here is the updated code for both. I hope that this is what you were looking for. The trailing stop still isn't initiated so i don't have anyway of diagnosising this problem. My suspicion is that it has something to do with the order not being selected and therefore trailing stop is not being initiated... I don't know if this is actually the case.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
i though that if you do () in those brackets it refers to the current order... the order selected earlier in the code. I can't stare at the code for hours. That would be completely inefficient j/k. Ok i read how to do a print statement and i seel what you mean. Sorry for the misunderstanding, I'm a beginner and don't really know the terms. I thought you meant printing the errorlog. I will print all the variables and post again. Thank you for all of your help.
Once an order is placed . . . .
This
and this . .
are both false because OrdersTotal() is no longer < 1 so the OrderModifys don't get called.
I ran your code on AUDUSD
Strategy Tester Report
Movingvaveragejstrategery
IBFX-MT4-Demo2 (Build 402)
Here is the updated code for both. I hope that this is what you were looking for. The trailing stop still isn't initiated so i don't have anyway of diagnosising this problem. My suspicion is that it has something to do with the order not being selected and therefore trailing stop is not being initiated... I don't know if this is actually the case.
oh thanks. looks like i still have some work to do haha. So, to clarify, i should delete the parameter orderstotal<1?
once again thank you for all of your help. you were a lot of help.
I was running it on euro because it has the lowest spread.
will you send me the updated code?
will you send me the updated code?