Multicurrency advisor. Preferably the opinion of the developers. - page 2

 
YuraZ писал (а): Frankly speaking, it's not very nice either ... let's imagine that the tick did not come for the specified pairs and you'll miss them again

If you showed a piece of code that generates the input, it would be faster to find the error in the logic

But there should be a commonly accepted solution in MQL, right? How to "synchronize" the opening of bars for different symbols? Well, apparently, we should wait for the opening of a new bar for all symbols that are used. But how to do it correctly?

 
Integer:

For the traded symbol, the tick of the new bar came earlier so the old bars of the analyzed symbol were involved in the analysis, start worked out, and waits for the next hour. something like this.

That's probably how it happens. But there must be some solution in MQL, right? This is not some kind of super-function. How to "synchronize" the start of bar opening for different symbols in real time?

 
LeoV:
YuraZ wrote (a): To be honest and it's not really nice ... imagine that the tick did not come on the specified pairs and you'll fly past again

If you showed a piece of code that generates the input, it would be faster to find the error in the logic

But there should be a commonly accepted solution in MQL, right? How to "synchronize" the opening of bars for different symbols? Well, apparently, we should wait for the opening of a new bar for all symbols that are used. But how to do it correctly?

Yes - Call Bill Gates.

 
Integer:

Bingo - Call Bill Gates

Well Bill Gates has nothing to do with MQL. Nor does he seem to have anything to do with forex either)))))))))

 
LeoV:
YuraZ wrote (a): To be honest and it's not really nice ... let's say that the tick didn't come on the specified pairs and you'll fly past again

If you showed a piece of code that generates the input, it would be faster to find the error in the logic

But there should be a commonly accepted solution in MQL, right? How to "synchronize" the opening of bars for different symbols? Well, apparently, we should wait for the opening of a new bar for all symbols that are used. But how to do it correctly?

In my example, it's enough to catch the beginning of the hour for any instrument.


You don't have to synchronize - I think that's what you're doing


while also considering that by others the new hour has also arrived!

because it will come!


and run the calculation after which the decision is made to enter the exit.


You are catching the tick!!! And a new tick and the beginning of the hour are not the same!

a tic WOULD not come for about 5 minutes...


you need to change the logic of catching the new bar to a softer one

you have too hard conditions for the start of the bar - I suggested a softer one


but if all symbols ( which are TAKING A tick does not come, then that's kinda wrong too - JUST THAT VERY LOW VARIETY!


---

you could give us a piece of code, we could talk about it substantially.

----



It looks like you have something like this in your code.

catch a NEW tick on EURUSD and if at the same time there is a tick on USDCHF, then you are ok.

and if the two events are separated by time, YOU DON'T ENTER.


THIS IS FAULTY LOGIC

 

YuraZ писал (а):

honestly and it's not exactly pretty ... If the tick did not come for these pairs and you will miss it again

If the tick did not come, you cannot place an order immediately, unless you use a script,

And only if ticks come to brokerage companies and they don't transmit them to your terminal (in the daytime).

That's why, when I was implementing a multicurrency Expert Advisor, I was making a State Machine by Miles (or Moore),

which monitored order open states for the needed pairs. Of course it was not always possible

Naturally, I was not always able to open at the necessary price, but this approach guaranteed that the orders would ALWAYS be opened.

 
thecore:

YuraZ wrote (a):

frankly and it's not exactly pretty ... If the tick did not come for these pairs and you will miss them again

If the tick did not come, you cannot place an order at once unless you use a script,

And only if ticks come to brokerage companies and they don't transmit them to your terminal (in the daytime).

That's why, when I was implementing a multicurrency Expert Advisor, I was making a State Machine by Miles (or Moore),

which monitored order open states for the needed pairs. Of course it was not always possible

Naturally, I was not always able to open at the necessary price, but this approach guaranteed that the orders would ALWAYS be opened.

easy ! it is possible to place an order :-) if the tick did not come

think it over ! if you can't figure it out i will give you a hint !


+1 one of the options YOU indicated

 
YuraZ:

YOU Catch the tick!!! and a new tick and the start of the hour are not the same thing

A tic may not come for about 5 minutes...

You need to change the logic of catching a new bar subtly to a softer one

you have too hard conditions for the start of the bar - I suggested a softer one

but if by all the instruments ( which ARE not coming tick then kinda doesn't work either - JUST THAT VERY LOW VARIABILITY!

Yes the thing is that the EA has to work on closed candles. Therefore, if a candlestick has not closed on any instrument used, the decision will not be made.

It is more difficult with the code because I'm not a programmer. I cannot lay out all of the code, as you can see. But the programmer who did it for me is now under a big contract and is very busy and cannot do it. So I am looking for a solution to this problem first, so as not to step on the same rake again.

 
LeoV:
YuraZ wrote: To be honest, it's not very nice either ... let's imagine that the tick has not come for these pairs and you will pass by again

If you showed a piece of code which generates the input, you could find the logic error quicker

But there should be a commonly accepted solution in MQL, right? How to "synchronize" the opening of bars for different symbols? Well, it seems to me that we should wait for the opening of a new bar for all symbols that are used. But how to do it properly?

There's no need for any synchronisation or invention of other bicycles. Everything has already been invented a long time ago. The presence of a new formed bar is checked only for that instrument, on which the Expert Advisor is installed at the arrival of the first tick. And the start() event also triggers only on that symbol at arrival of a new tick. I gave you a piece of code that performs this check so that the next position, in case of requotes, is not opened on the next bar and after a failure it tries to open on the same bar. It all works fine for me both in single and multicurrency modes. The deal in case of requotes is opened on the same bar, but only with some delay, and therefore not always at the open price of the bar, but with some offset. I.e. there will be differences with the tester, but not in bars, but in the opening price.

 
LeoV:
YuraZ:

YOU Catch the tick!!! and a new tick and the start of the hour are not the same thing

the tick might not come for 5 minutes ---

You need to change the logic of catching a new bar subtly to a softer one

you have too hard conditions for the start of the bar - I suggested a softer one

but if by all the instruments ( which ARE not coming tick then kinda doesn't work either - JUST THAT VERY LOW VARIABILITY!

Yes the thing is that the EA has to work on closed candles. Therefore, if a candlestick has not closed on any instrument used, the decision will not be made.

It is more difficult with the code because I'm not a programmer. I cannot lay out all of the code, as you can see. But the programmer who did it for me is now under a big contract and is very busy and cannot do it. So I am looking for a solution to this problem first, in order not to step on the same rake again.


And how do you envisage closing the hour in principle!


EURUSD has closed and the new hour is opened, while USDCHF is busy for 15 minutes... well, the ticks don't come!

If one instrument has closed the HOUR, then the others may be considered closed too.

ticks may not come for them


---

you should not think that the hour should be closed by a tick for all necessary pairs


it is enough to get the beginning of a new bar on any pair

---

Reason: