I'm using 2 indicators, one is current window and the second is indicator_separate_window.
How do i change thetimeframe for the secondindicator?
So if im using the standard zigzag how do I go about this?
Thanks.
paulgriffiths: how do I go about this?
| About what? There are no mind reader's here. |
About what? There are no mind reader's here. |
I want my second zigzag to show 1 hour timeframe.
Thanks.
paulgriffiths: I want my second zigzag to show 1 hour timeframe.
| You can't with the standard indicator. It run on the chart's TF. Search for a MTF version, or create it. |
| You can't with the standard indicator. It run on the chart's TF. Search for a MTF version, or create it. |
I have the code for the zigzag indicator. So only need to modify it.
I'm ok at programming so just need to know what to change.
The zigzag indicator code uses high[] and low[] buffers. What should I use if i want to use 1H timeframe?
Thanks.
Modifying it is the hard way. Every High[i] must be rewritten as iHigh(_Symbol, PERIOD_H1, iBarShift(_Symbol, PERIOD_H1, Time[i])) and you need to separate chart's bar indexes from H1 bar indexes.
Easier is to write a new indicator, get the two values using buf0[i]=iCustom(_Symbol, PERIOD_H1, ..., 0, iBarShift(_Symbol,PERIOD_H1, Time[i])) and you're done.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'm using 2 indicators, one is current window and the second is indicator_separate_window.
How do i change thetimeframe for the secondindicator?
I have tried:
But it changes both.
Both indicators are the standard ZIGZAG indicators provided.
Thanks.