[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 641

 
Vinin:

That's what MT does, if you get it right in the indicator
I see. And what exactly does MT do? Initialization of an array?
 
Fox_RM:
I see. What exactly does MT do? Initialization of an array?

I mean indicator arrays
 
r772ra:

Something like this: if there is not enough

I've thought about and even implemented such a variant, but it's "heavy", it loads MT quite a lot when it starts up. Especially if there are several arrays. As a result, I've just started setting the Bars dimensionality.

So far, the size of arrays has not exceeded its limits. But all the same, I have a feeling this is a CUSTOM approach to solving the problem. That's why I'm asking how to do it RIGHT.

 
IgorM:

This must be the design you're talking about?

If you need to analyse open orders, the code is more complicated there

The orders are just an example. If it is more than X and less than Y, exactly! Thank you)
 
Vinin:

I'm talking about indicator arrays
I understand that about indicator arrays, but I'm not quite clear on WHAT exactly the MT does?
 
Fox_RM:

I've thought about and even implemented such a variant, but it's "heavy", it loads MT quite a lot when it starts up. Especially if there are several arrays. As a result, I've just started setting the Bars dimensionality.

So far, the size of arrays has not exceeded its limits. But all the same, I have a feeling this is a CUSTOM approach to solving the problem. That's why I'm asking how to do it RIGHT.


The right way is to understand what the problem is. If you transfer the indicator code to the Expert Advisor, it is well described by Kim.
 
I've got it, and now I'm trying to change something in it. I can't get the reversal condition to change it (if I'm in the plus side, I will be in the red), so I can always trade only on entry options.
Files:
vic013_v1.mq4  25 kb
 
Help Who Can!!!
Help me write an EA which opens one market order Buy c stoploss 20p, take profit 20p, and immediately opens a pending BuyLimit order at a distance from the open market order of 20 pips. with stop-loss 20 points, take profit 20 points, but with a lot twice larger, and one more order, a pending BuyLimit order at a distance of 40 points from the open market order with stop-loss 20 points, take profit 20 points, but with a lot three times larger. And when closing any order at Take Profit, all pending orders are closed and the scheme repeats all over again.
 
Can you advise if you have had such cases when an EA hangs? That is, it works fine, and then it just closes one of the orders (closes as required) and does not open a new one =( It may work fine for a month, but then it hangs! What it may be connected with and how to fix it?
 
r772ra:

How to do it right, you need to understand what the problem is. If you transfer the indicator code to the Expert Advisor, it is well described by Kim.

If you don't mind, please give me the link :) I would like to see the differences from the way described by Nikolay Kositsin .
Reason: