
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi All,
See first pic below, which is what I am aiming for- an MTF display for my indi with both tables and charts in the same window, 4TFs in my case given maxBars= 20 latest bar calculation displayed, to fit all the TFs in one screenshot.
[ NOTE: I can get this display by using mql versions running for M1, M5, M15 and H1 TF displays individually, via dropping such 4 mq4's one by one from the Navigator window. But, when I switch TFs on the chart, I can see the charts but only the last table which switches display position to the first TF. ]
What I need is a single mq4 that can display the whole indi at once. The second problem is the lack of proper display on the highest TF, H1.
What I get from the current mq4 is just the display of the last table, H1, in the first display position (M1, leftmost) and the last chart, H1, in its last position(H1, rightmost). See second pic below.
I am a newbie coder, so would very much appreciate actual code snippets and advice !
Check the Start() and main function code snippets below, and the full mq4 attached.
Basically the currency strength calcs are done from calcTMA, getSlope, and calcCSS functions that ultimately depend upon iMA (tf, shift) and iCllose (tf, shift). The main function, DrawChartsTables, then starts with the usual IndicatorCounted lines to avoid recalculations, adjusts for the TF bars size to run the bars loop, then employs shift = iBarshift for all TFs, and does the calculations by calling above functions and uses some additional code (diff section). The 8 currency charts are displayed via Set commands for the 8 buffers; and the CurrencyTable via ObjectCreate.
SUGGESTIONS:
1. Is buffer overflow a problem? How would I use, say, ArrayCopy or ArrayCopySeries here?
(But then why would it display single TF x 4 via Navigator drops in same window?)
2. Should I use Sleep() in Start() after each DrawChartsTables function call to slow down the TF calculation switches?
What are appropriate numbers?
3. Is placement of RefreshRates in DrawChartsTables the problem? Moving around RefreshRates in the function causes the last table vs the first table to be displayed in the first TF display position (leftmost.)
Start() code:
Main Function: