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
If you call this function
when there are no orders present you crash the program with a zero divide.
It also doesn't check the OrderSelect.
Why are you re-checking for OrderSymbol and OrderMagicNumber after you have just rejected trades (with a continue) that do not meet those criteria?
Well running that in the strategy tester gives me a zero_divide error and no trades at all.
Fix ...
And it now trades.
BUT it is still not good code, and it is giving OrderSend error 4051 with invalid lots amounts.
s
If you call this function
when there are no orders present you crash the program with a zero divide.
It also doesn't check the OrderSelect.
Why are you re-checking for OrderSymbol and OrderMagicNumber after you have just rejected trades (with a continue) that do not meet those criteria?
sorry, i can not answer that as i did not write the code. i know it functions well without my added "Ask<Buy_Price" line. i only wanted to limit it from continuing to open orders as the price rose beyond a certain point. i am begining to think it is not possible.
sorry, i can not answer that as i did not write the code. i know it functions well without my added "Ask<Buy_Price" line. i only wanted to limit it from continuing to open orders as the price rose beyond a certain point. i am begining to think it is not possible.
I would recommend that you dump that code and start from scratch. There is a lot of code and it is not well written -- and even if it were well written you wouldn't understand it!
It is better to start off simple and add things as you go. You will then really understand the code and be able to change it to do what you want. It will take a bit of time but you will get to your final goal much faster.
I would recommend that you dump that code and start from scratch. There is a lot of code and it is not well written -- and even if it were well written you wouldn't understand it!
It is better to start off simple and add things as you go. You will then really understand the code and be able to change it to do what you want. It will take a bit of time but you will get to your final goal much faster.
Thanks, sounds like good advice. thanks for your time and help.