[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 39

 
hoz:
To be honest, I have no idea why such a thing would be needed at all. Apparently the developers didn't think of that either.
It's very good that there are things the developers didn't think of. If you put things like that together and put them together, you can
 
Kobalerro:

Thanks for the advice, but it's a bit too complicated. And then in your version, it turns out all work, and it takes 10 to check the condition for entry,

and they open only the five that were the first to succeed and then, when one of them closes, the first one that matches the conditions opens again,

not limited to EURUSD 1 , GBPUSD 1 , EURGBP 0.

I think there should be a simpler solution. Like counting the total number of orders with a limitation condition by a given parameter.

There should be a limit either for a symbol or a magic number, but not more than one.

Although, perhaps, your variant will also work, but how to implement it in the code, I can not think.


Yes, I think so ! I've really got the hang of it here, I can do without writing to disk easily !
I'm just tying the reins from the standard terminal to another one
I'm just tying up the reins of a standard terminal for another one.)

Forgive me, but we're going to have to do it anyway.
because as sir Freddie Mercury said.
Show must go on!

So let's get the specs straight.
As I understand it:

1. On one account I have a shitload of windows open (10 pieces) with any set of charts of currency pairs

2. On each chart sits a work horse - an Expert Advisor, which does something.

3. The account must meet the following conditions:

3.1 The total number of open market orders in the account must not exceed 5.
Orders of the horse type (pending) should not be counted as such (I think so, but you have not specified it)
3.2 Based on a set of charts on the account, a certain list of symbols is formed,

And each of these symbols may have at most one symbol at any given time.

at any given moment of time may have no more than one open order.

---------------------------------------------------------

Something like this! See if everything is correct!
Then please tell us in what language it should be done (like mq4 or mq5)
and list of instances for which you trade - is it fixed or different each time

I think it should be a short paste in the text of each EA

(which you can later on if you want) will allow him to

decide about the currently existing permissions for any actions ...

I would like to take my leave now as it is 5 am :))

madzx

 
Kobalerro:

Thanks for the tip, but it's too much of a mystery. And then your version of the function works for all of them, and it takes 10 to check for an entry condition,

and they open only the five that were the first to succeed and then, when one of them closes, the first one that matches the conditions opens again,

not limited to EURUSD 1 , GBPUSD 1 , EURGBP 0.

I think there should be a simpler solution. Like counting the total number of orders with a limitation condition by a given parameter.

And the limitation either by symbol or by magician is not more than one.

Although, perhaps, your variant will also work, but how to implement it in the code, I can not think.



Do not wrestle in three pines. Bifurcate exp transactions under unique magiks (assign your magik to your exp orders on the selected symbols). Then, using the conditional if - else operator, you connect the filter by symbols and magic symbols, using this function from Kim I.V. with different input values:

NumberOfOrders() function.

. That's it.

 
hoz:


HM. I didn't understand what you mean until I read the whole thing :) What type of data do you want in the output?

The way I see it, the solution to this situation is as follows:

1. Convert numbers int 59 and 17 to string type

2. Then we concatenate the data of these strings.

3. we convert them back to int type

There may be other options, but I can't think of any other at the moment.


Great answer - simple and straightforward - and you don't need any other options, because this one is
very good .... :))
 

I'm going to try my luck again.

Hello There is an indicatorhttps://www.mql5.com/ru/code/7176

It works well on history. In real life it is very tattered, etc.

If I wanted to use this indicator for example as a basis for re-drawing/recalculating each bar or each interval?

For example if you trade on m5 and waiting for a signal it may not come, you are waiting for 15-20 minutes, then you switch to any other timeframe and again on m5 and it turns out that you have a signal. You switch to another timeframe and again on m5 and it turns out that it was there 10 minutes ago. How can you automatically recalculate it without switching to another timeframe?

 

A funny question has come up. For example, I decide to open a buy order on a condition:

1. the fast wave1 crossed the slow wave2 from bottom to top. (What is important is not the moment of crossing, but that fast wave1 is higher than slow wave2).

2. The candlestick touched the fast 1, so we open a buy order.

I thought about it, and so I understand that we need to create conditions that if the price of the candle is approximately equal to the price of quick wave1 apparently with some specified deviation, right?

Basically, since the candlestick is currently at the top once the fastmask1 crosses the slowmask1 from the bottom, then over we need to compare the candlestick's low with the price of the fastmask1?

i.e.

if( iMA(fast) > iMA(slow) )
{
  if(low[0] == iMa(fast))
  OrderSend(параметры посыла ордера);
}

But in this case the point is not taken into account that the candlestick is unlikely to be exactly at the price of iMA(fast), because the price can quickly jump through it and go further or bounce. So, we need to specify some range.

How to implement it correctly?

 
Twilight:

I'm going to try my luck again.

Hello There is an indicatorhttps://www.mql5.com/ru/code/7176

It works well on history. In real life it is very tattered, etc.

If I wanted to use this indicator for example as a basis for re-drawing/recalculating each bar or each interval?

For example if you trade on m5 and waiting for a signal it may not come, you are waiting for 15-20 minutes, then you switch to any other timeframe and again on m5 and it turns out that you have a signal. You switch to another timeframe and again on m5 and it turns out that it was there 10 minutes ago. How can you automatically recalculate the signal without switching timeframes?

Have you carefully read the author's description of the indicator (see link)?

The only catch is that this indicator is, shall we say, dynamic. That is, it can redraw more than ten (!) bars. And what you see as green used to be red. And it only turned green because the trend went up.

??? - it's already overdrawing!!!
 
silatyt:

Have you carefully read the author's abstract for this indicator (at the link)?

The only catch is that this indicator is, shall we say, dynamic. That is, it can redraw more than ten (!) bars. And what you see as green used to be red. And it turned green only because the trend went up.

??? - it re-calculates anyway!!!


I know that it redraws. I am interested in the technology of recalculation of any indicator with every new bar or a certain interval.

I am interested in the technology of re-calculation of any indicator.

The question is how to re-calculate on each bar any indicator without changing the timeframe manually.

 
Twilight:


I know it redraws. I'm interested in the technology of recalculating any indicator every new bar or a given timeframe in general.

Even if there is something else later on.

The question sounds like recalculating any indicator on every bar without manually changing the timeframe.

Have you ever looked inside of any indicator? In general, it looks like this:

int start()
  {
   int counted_bars=IndicatorCounted();
//----
   if (counted_bars < 0) return(-1);
   if (counted_bars > 0) counted_bars--; 
   int limit=Bars-counted_bars;
   for (int i=limit;i>=0;i--)
    {
    //расчёт индикатора
    }
//----
   return(0);
  }

The variable that defines the number of bars you want to recalculate is called limit. You can use it as a base from which to calculate.

 
silatyt:

Have you ever looked inside any indicator? In general, it looks like this:

The variable that determines the number of bars to be recalculated is limit. You may calculate it from there.


You want to insert the code of the indicator into the Expert Advisor and re-calculate it there?

What if there are 5 indicators?

Is there any other way to recalculate them?

I attach all the indicators to the Expert Advisor through iCustom

The call of indicator and its last value and so on every new bar, but it is not redrawn in the traded symbol window until you change the timeframe and go back.

If you press PCM and press refresh, then there is no redrawing, it is redrawn only when you change the timeframe.

P.S. And the software PCM/refresh as called?

RefreshRates seems to be wrong.

Reason: