[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 442

 
semiromid:


Sometimes you have to ask questions to understand something.

Help.... Answer the question ..............

This is the part that gets triggered on every tick

case OP_BUY:
//Задача для ордера типа OP_BUY
break;

case OP_SELL:
//Задача для ордера типа OP_BUY
break;


And it should only be triggered with every new order, once.

Maybe some counter needs to be attached, by ticks, magiks or other order qualifier, or maybe arrays? If you do not understand it I will not be able to go further.


Try to set bool flags BuyOpen, SellOpen. When a deal is opened set 1, and when it is closed set 0. And in the conditions for opening/closing these values should also be checked accordingly.

 

re-posted

klik:

Hi all!

Newbie help. Need: when Long&Short iMA is on it cuts off the direction we don't want...

 

Several times already, my compiler has produced this message:

You'd have to try hard to get that message, I tried.) At that time, I distributed the code across several functions to solve the problem. I am developing quite a complex Expert Advisor structure and may I come to that Start() function has such a restriction too?

 
tol64:

Several times already, my compiler has produced this message:

You'd have to try hard to get that message, I tried.) At that time, I distributed the code across several functions to solve the problem. I am developing quite a complex Expert Advisor structure and may I come to that Start() function has such a restriction too?


Recursion seems to be used
 
Vinin:

Recursion seems to be used

In general, such a message was generated when the ObjectCreate() function was called many times in the body of one user function. Recursion is when a function calls itself, if I understand correctly. And I would also like to hear about the Start() function. Are there any limitations? How complex and cumbersome in code can an EA be created in mql4? I already have about 5000 lines in total, and I still have quite a lot to write).
 
tol64:

In general, such a message came out when the ObjectCreate() function was called a large number of times in the body of one user function. Recursion is when a function calls itself, if I understand correctly. And I would also like to hear about the Start() function. Are there any limitations? How complex and cumbersome in code can an EA be created in mql4? I already have about 5000 lines in total, and I still have quite a lot to write).

Correctly written 30 thousand lines is not a problem
 
Vinin:

Correctly written 30 thousand lines does not cause problems


Great! (Laughs) So there's an opportunity to turn around).

I'm also interested in this question. For me, at this stage of learning the language, it's difficult to make a multi-currency EA for full-fledged testing. That is why I think to do the following. To test the Expert Advisor separately for each symbol without MM, i.e. the result will be given in points. The trades will be written to a file. Then perform all calculations of money management in Excel. Also, the deposit load and any other indicators of interest can be calculated in Excel. May the obtained result be considered correct?

P.S. It seems that I have encountered articles on the creation of multicurrency mode, but I cannot find them now. Was it there or am I dreaming?))

 

Good evening or day for whom again, too bad I went unnoticed and no one answered my questions, although, it's not relevant anymore, figured it out myself, talked - it was explained to me (not so long reading the forum, not Lenin, I read slowly...).

the question is different, what kind of predictions and possible trends are we talking about when emissions are unpredictable at all? well between trades maybe. Sines and cosines, Furieux, Runge-Kutts of all sorts ))))) amusing... Folnova theory - interesting, but right after the spikes.

Operational "advisor", multi-currency - possible, but not a panacea apparently. My goal is not the Grail, but just income, with losses that are less than this income when bringing up the next balance - there is no simple money, it must be earned by other work, laying ties, sweeping the pavement, painting....

I will write an adviser myself, I am a programmer, 15 years, different projects, I do not care what to write, I will post the code, results, but I will need communication, data, etc.. I've only been here a week, stop me if this is nothing, Moderators? ....

 
Maxaxa:

Good evening or day for whom again, it's a pity that I went unnoticed and no one answered my questions, although, it is no longer relevant, I sorted it out myself, I talked - it was explained to me (not so long reading the forum, not Lenin, I read slowly...).

the question is different, what kind of predictions and possible trends are we talking about when the outliers are unpredictable at all? well between trading maybe. Sines and cosines, Furyo, Runge-Kutts stuff ))))) amusing... Folnova theory - interesting, but right after the spikes.

Operational "advisor", multi-currency - possible, but not a panacea apparently. My goal is not the Grail, but simply income, with losses that are less than this income when bringing up the next balance - there is no simple money, it must be earned by other work, putting sleepers, sweeping the pavement, painting....

I'll write an adviser myself, I'm a programmer, 15 years old, different projects, I don't care what to write, I'll post code, results, but, I'll need communication, data, etc. I've only been here a week, stop me if this is nothing, Moderators? ....

I am amused by the red highlighting too :-))) Have you tried them yet?

The wave theory has always amused me :-)) You reminded me of it again. That's how cool it is to always explain everything in hindsight with endless variants of explanation! Surely that helps a lot in trading?

 
Maxaxa:

...I've only been here a week, stop me if this is nothing, Moderators? ....

If there are specific first level questions, ask here.
If you have something to offer, something to share, something to discuss, create a separate thread.

Branch requirements:
- An informative title
- material for discussion
- Discretion in dealing with your opponents
Reason: