This indicator will display Heikin Ashi colors (red or green) from any period on any other period.
In this example, I'm putting 10 minute Heikin Ashi colors on 1 minute bars.
This is possible thanks to the Aggregation Period function.
Notice the white label in the upper left hand corner designates the period in use.
In this example, I'm putting 10 minute Heikin Ashi colors on 1 minute bars.
This is possible thanks to the Aggregation Period function.
Code:
input UsePeriod = aggregationperiod.ten_MIN;
Code:
## Heiken Aski Multi-Time Frame
## 2019 Paul Townsend v3
input UsePeriod = aggregationperiod.ten_MIN;
def aOpen = open(period = usePeriod);
def aClose = close(period = usePeriod);
def aHigh = high(period = usePeriod);
def aLow = low(period = usePeriod);
def haClose = (aOpen + aClose + aHigh + aLow)/4;
def haOpen = (haOpen[1] + haClose[1]) /2;
assignpriceColor(if haOpen < haClose then color.green else
if haOpen > haClose then color.red else color.white);
addlabel(yes,"[" + useperiod/60000 + "]",color.white);