molanisfx wrote:
By default the indicator builder create indicators that work on any time frame - the time frame is taken from the chart.
If you want to create indicators for mt4 with a fixed time frame you need to add an extra step:
-first create the custom indicator for any timeframe
-then create a new indicator, click on indicators and select custom indicators. Import the first indicator
You will see something like iCustom(NULL,0,"indicator name", variables,0,i), manually you can set the timeframe, change the code to iCustom(NULL,PERIOD_D1,"indicator name", variables,0,i)
PERIOD_D1 forces the indicator to use the daily timeframe
Nice! Ye ol indi of an indi trick. I like it. I have more of these than I care to admit.
I just remembered, there is a free #MTF_MovingAverage indi out there. It's made from a template that includes instructions in the comments. It's bascially an indi of an array, which isn't too different from an indi of indi. Biggest difference is it's self contained.