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

 
T-G:

I need to get the price of another instrument during testing in the tester . For example, I am testing on euros and want to get the pound price.

It does not work in the tester (although the demo and real give the price of another instrument) my question is how come when testing on the euro and still get the pound price. iClose is rough.


There is no other way, the tester simply will not emulate ticks for other pairs, we may test it only in real time on the demo. You should look for a third-party solution, it was presented here on the forum. I think it is similar to this one.
 

Hello all, good people, help me with advice! There is a script that places orders at a set time, at a certain distance from the price. Several orders, all at the same price. I am working with several terminals on one account. It is very important for me to place all orders at one price. Often one of the terminals lags a little (a fraction of a second). As a result, some of the orders which are handled by the lag terminal may be shifted by 1-2 points. It has recently cost me a quarter of deposit. On the whole, prices are the same in all terminals. The difference is in time of orders placing because of lag of one of the terminals. The script grabs the first price that appeared in the flow after the set time. The order placement starts from this price. In general, I have found out how to solve this problem. Unfortunately, I do not understand mql at all. I need to reorient the script from opening orders at the current price to opening them at the Open minute bar. I do not know how to do it. I have tried it and it has not worked. I have changed the current price Bid to Open. (Of course, it doesn't work)) - apparently, it is some kind of a function. The result - it won't compile! Replacing it with Price_Open. It compiles but does not work. The orders are not placed at all. Please, advise how to do it. Thank you in advance!

 
T-G:

I need to get the price of another instrument during testing in the tester . For example, I am testing on euros and want to get the pound price.

It does not work in the tester (although the demo and real give the price of another instrument) my question is how come when testing on the euro and still get the pound price. iClose turns out roughly.



The market environment from other instruments cannot be obtained, which means that Marketinfo() on other instruments returns 0. To obtain the price you have already been advised to use iClose(), which works correctly (relatively of course)

 

I have MTF_MovingAverage indicator, when shifted it draws like this:

Professionals, please help me get rid of this line so that everything is displayed correctly.

Files:
 
I have a condition:
if (a==1 || a==5 || a==10)
{ некоторое действие }
Can this condition be written in this way:
if (a==1 || 5 || 10)
{ некоторое действие }
 
paladin80:
I have a condition: Can the condition be written like this:

You can't. What's the problem with typing an extra 6 characters into the code?
 
evillive:

You can't. Why is it difficult to type an extra 6 characters into the code?
Of course it's not, it's just that it's always more interesting to find a way to write shorter code.
 
Vinin:


The market environment cannot be obtained from other instruments, which means that Marketinfo() for other instruments returns 0. You have already been advised to use iClose() to get the price, which works correctly (relatively of course)

I tried it with iClose(), the price changes once per minute. Can I find a way to get the price of each tick for another symbol?
 
Did you follow this link?
 
evillive:
Did you follow this link?
Of course that's not it, it's not testing muliwallet experts. can we stop with the "just to answer" replies for the sake of typing up posts?
Reason: