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
Thanks for your effort, I have posted the code in the message above.
BTW I checked for OrderCalcProfit threads, but nothing did any help for me. Either it was much to specific for little, little effects I think I am not looking for. It's not about half a percent off expectation, but we are talking about a factor of 100 (!!!) I am missing. Well, quite a few of those threads are to high-level for me, I was simply not able to understand...
One potential issue with your code is that you're calling OrderCalcProfit(), with price parameters, inside of OnInit(). Based on my past experience, prices are not loaded when OnInit() runs.
See the placement of OrderCalcProfit() in the documentation: