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

 
Fox_RM:

Good day to all!

Question about iMAOnArray(array[], total, period, ma_shift, ma_method, shift)function

Can you tell me if array[] must be a buffer array or can be any? The problem is that when

I create and initialize an array in a program, this function doesn't work. But when I bind via SetIndexBuffer

... everything works as it should.


Applied in an indicator or EA? Although SetIndexBuffer seems to be used only in indicators...
 
Fox_RM:

Good day to all!

Question about iMAOnArray(array[], total, period, ma_shift, ma_method, shift)function

Can you tell me if array[] must be a buffer array or can be any? The problem is that when

I create and initialize an array in a program, this function doesn't work. But when I bind via SetIndexBuffer

... everything works as it should.

An array in the function you mentioned doesn't have to be a buffer array, BUT when using a "non-buffer" array, don't forget to initialize it (specify its dimension - ArrayResize(array, n)) or directly when declaring it - double array[n].
 

Hello!

Can you tell me how to use a variable from an indicator in an EA? For example, the indicator draws channels, how can I prescribe the use of a graphical object from the indicator in the EA condition?

Files:
 
skyjet:

Hello!

Can you tell me how to use a variable from an indicator in an EA? For example, the indicator draws channels, how can I prescribe the use of a graphical object from the indicator in the EA condition?


In this case, it is easier to transfer calculations to the Expert Advisor and forget about the indicator
 
Can you tell me if this is possible? I need a code so that the Expert Advisor switches off on Friday afternoon when all trades are closed. i.e. it works from Monday to Friday and switches off in the afternoon, so as not to stay for the weekend, because it opens with a gap. tentatively from 12 o'clock on Friday it already waits to close trades independently and after closing in the plus, it switches off.
 
b_o_l_t:
Can you tell me if this is possible? I need a code to turn off the Expert Advisor on Friday afternoon when it closes all trades. i.e., it works from Monday to Friday and turns off in the afternoon, so as not to stay for the weekend, because it opens with a gap. tentatively, let's say from 12 o'clock on Friday it is waiting for trades to close by itself and after closing in the plus, it turns off.

You do not need to switch it off, just set a time limit
 

Myth63: Госпада эксперты, подскажите пожалуйста как закачать в терминал харошую историю катировок.

And what do you mean by the mysterious phrase "a good quotation history"?
 
Vinin:

You don't have to disable it, just put in time limits
Well if you put restrictions it will just stop trading, it has a martingale in it, if it flies it will not open trades?
 
b_o_l_t:
Well if you put restrictions it will just stop trading, it has a martingale in it, if it flies it will not open trades?


Why do you think so, or did someone tell you this nonsense?

It can always be solved, if necessary of course.

 

feVinin
:


In this case it's easier to transfer the calculations to the Expert Advisor and forget about the indicator


Okay, one more question - if opening condition contains such variable as price, then Price should be enough? For example:

if( MA > Price && MA > 0 )
{
return;
}
Reason: