With ONE indicator I intend to scan multiple instruments(AA,BB,CC) by running the indicator on Chart X. Current
chart used is 1 minute. Then print the close[1] of each of these instruments.
Example ---> close of AA at 11:57:00 - 100 ..... close of AA at 11:58:00- 101 .... close of AA at 11:59:00 - 102
For example if the time now is 11:59:01 , I want to print close[1] meaning it must print 102 the moment the new bar begins.
Problem 1 - At 11:59:01, if there is no new tick on chart X, it waits till the first tick is generated on chart X which can
be a few seconds later and then it runs and prints the values.
Problem 2 - At 11:59:01 if there is a tick on Chart X and when it runs the program..... "if there is no new tick on chart
AA" ....the program prints the 101 which is in fact the close[2].
And here is my code I have now. Help me correct this issue. Thanks in advance
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Here is what I am trying to achieve.
With ONE indicator I intend to scan multiple instruments(AA,BB,CC) by running the indicator on Chart X. Current chart used is 1 minute. Then print the close[1] of each of these instruments.
Example ---> close of AA at 11:57:00 - 100 ..... close of AA at 11:58:00- 101 .... close of AA at 11:59:00 - 102
For example if the time now is 11:59:01 , I want to print close[1] meaning it must print 102 the moment the new bar begins.
Problem 1 - At 11:59:01, if there is no new tick on chart X, it waits till the first tick is generated on chart X which can be a few seconds later and then it runs and prints the values.
Problem 2 - At 11:59:01 if there is a tick on Chart X and when it runs the program..... "if there is no new tick on chart AA" .... the program prints the 101 which is in fact the close[2].
And here is my code I have now. Help me correct this issue. Thanks in advance
Here is my current code.