so your code is checking for already opened positions only if there's no opened position...
Thanks for the response; so would that affect the decision making for taking a position on not by the expert?!? my specific problem is that the EA is NOT taking positions; according to the rules of taking an order there should be a reasonable number of trades to be taken; specially during a consolidating market; as the MA's are usually close to each other during those conditions; and also I've tracked the market conditions using the visual mode working on a history data and there were alot of times that the EA failed to take positions!! I would really appreciate if you can help me finidng whats wrong with this simple EA as its going to be the basis for me to improve my skills for this hobby of mine and I am sure of so many others,
Thanks again,
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Thank you for the great site; I am trying to write my first expert; I would appreciate if someone can take a look at it and get me a feedback about it; its not that wow thing; I am just trying to get myself familiar with the proper structure for writing expert advisors; my expert should be taking a position long in positive cross between a fast and a slow MA's; and to take a short position in the case of a negative cross; when I back-tested this expert -also trying it live on a demo account- it wasnt taking any positions; only it took ONE short position in the back test process; and BTW the backtest I did was a proper one using a tick by tick analysis for a history data that I downloaded from Alpari's web site; and used the period converter script to do the math for generating the other periods; anyway; I would appreciate the insight you guys can post about my expert as I am excited to get more deeply involved wirting EA's, Thanks.
P.S. you can notice those two paranthesis "}}" at the very end of the code; I dont know why when I use only ONE it gets me an error!!!!!!!!