I am getting an error quot;work definition unexpectedquot; I typed it in to the search engine and couldn't find anything. . Does anybody know what I should be looking for to fix it and what this means?
I am getting an error quot;work definition unexpectedquot; I typed it in to the search engine and couldn't find anything. . Does anybody know what I should be looking for to fix it and what this means?
When you double click the error what line does it take you to? Additionally, attach your EA so people may help youwe will waste time imagining what the problem may be.
As you may see, I am attempting to wash an old EA and enter my design to it and make it dynamic.... It will be challenging since I am not acquainted with this app language
I'll be going one by one and incorporating alterations once I have a decent frame set up
==========================
Edited it since I cleaned out a little more.... And went back through my notes also added more credits in it....
https://www.forexsoutheast.asia/atta...2848662951.mq4
Is there something or a program that will help with viewing the code's layout? It seems to me it would be easier to write in some other area and then move over to the MetaEditor since it's really tough to line up the brackets.... I added it to the end and it compiles but I am convinced it isn't properly aligned probably, and that I Will Need to take care of that when the guts of the beginning function change up
No, that is the joy of working with mt4. Nothing that will assist you troubleshoot the code. I indie each one and would print it out and make sure that there is one to shut it out. Probably the most easy way.
For a habit of mine, each time I open a new I set in two blank lines and set the opposing so I remember. I then go back and fill in the lines.
That is exactly what I do too. And to facilitate indentation, I use the tab key a lot. It is equal to 3 spaces (configurable in options).Originally Posted by ;
Inserted Code for(cnt=0;cntlt;OrdersTotal();cnt ) if (OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES)) if (OrderSymbol()==Symbol() OrderMagicNumber() == MagicNumber) if (OrderType()==OP_BUY Ok, I am trying to figure out logistically what exactly this is Performing... Either from a programming Perspective and a Forex trading Perspective
It looks like It's counting the number of open trades, but I don't have a fullf grasp of the logic behind what is Actually being done here... here's my interpretation
It's looking to see if there are Some opentrades... then if there are, It's checking the magic number/symbol combination.... Then if it's a market or limit order.... Then running a count of each... that the OrderSelect function is not explained to me clearly in the metratrader library
Inserted Code And this Really Is the pseudo code logic that I am trying to implement... I'm Certain it may be Overlooking some checks, but basically, I want it to check if the currency is tradeable based on a market scan script... if it is then to only Let It have only one order Started per line