- most123: i dont know what is the problem
Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?
Code debugging - Developing programs - MetaEditor Help
Error Handling and Logging in MQL5 - MQL5 Articles (2015)
Tracing, Debugging and Structural Analysis of Source Code - MQL5 Articles (2011)
Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator - MQL5 Articles (2010) -
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
Messages Editor -
if(Close[1]>ma1&&time!=Time[0]&&orderstotal()<max)
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problemAlways post all relevant code. We have no idea what time is or if it is ever updated. We have no idea what orderstotal() does. We have no idea what max is.
hello all
my experience in mql4 is not much but i am trying
i have an expert for moving average but the problem when i add it to work on any time frame like 5 minutes it opens an order every 5 minutes when there is already an existing order!!
this is a part of the expert
ma1=iMA(NULL,0,50,0,MODE_SMA,PRICE_CLOSE,0);
if(Close[1]>ma1&&time!=Time[0]&&orderstotal()<max)
i dont know what is the problem
i just need it doesnt open any order until the existing order closes .. thank you
What is the value of max?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
my experience in mql4 is not much but i am trying
i have an expert for moving average but the problem when i add it to work on any time frame like 5 minutes it opens an order every 5 minutes when there is already an existing order!!
this is a part of the expert
ma1=iMA(NULL,0,50,0,MODE_SMA,PRICE_CLOSE,0);
if(Close[1]>ma1&&time!=Time[0]&&orderstotal()<max)
i dont know what is the problem
i just need it doesnt open any order until the existing order closes .. thank you