
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
What I see in your code is that nothing is done if there are already order(s) open. So it is inefficient to do the calculations unnecessarily. OrdersTotal() should be the first check and bypass the calculation code if there are open order(s).
It would be better to loop through open orders and check for magic number and symbol
Note that by just using OrdersTotal() as a check, any manually opened trades or by another EA will not allow orders to be placed. It is better to check for open orders with magic number and symbol.
Why use variables for Ask and Bid when you can just use Ask and Bid? If you have a lot of code, you can use RefreshRates() to make sure that they are current.
Why use the bools UpBreakThrough and DownBreakThrough when you can just test the condition and go straight to the code?
I would avoid using variable names such as point as it is too easy to mistakenly type Point.
Check your calculations for TP and SL, they will not be calculating as you want