Trailing Stop is not Executed in Backtesting. No Errors.... Please help because I'm stumped. - page 2

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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?