Bingy
Member
Below is a super simple Multi-timeframe price action indicator, that allows you to quickly see (3) different timeframe of price action displayed as lines in order to pinpoint points of interest without needing multiple charts open at a time. It's a real space saver and makes it simple to identify the way things are moving at a quick glance.
Code:
Declare lower;
# Declare lower study with daily, 4-hour, and 1-hour close prices as lines
input aggregationDaily = AggregationPeriod.DAY;
input aggregation4Hour = AggregationPeriod.FOUR_HOURS;
input aggregation1Hour = AggregationPeriod.HOUR;
def dailyClose = close(period = aggregationDaily);
def fourHourClose = close(period = aggregation4Hour);
def oneHourClose = close(period = aggregation1Hour);
plot dailyLine = dailyClose;
dailyLine.SetDefaultColor(GetColor(1)); # Change color if needed
plot fourHourLine = fourHourClose;
fourHourLine.SetDefaultColor(GetColor(2)); # Change color if needed
plot oneHourLine = oneHourClose;
oneHourLine.SetDefaultColor(GetColor(3)); # Change color if needed
# Add labels to identify the lines on the chart
AddLabel(yes, "Daily Close", GetColor(1));
AddLabel(yes, "4-Hour Close", GetColor(2));
AddLabel(yes, "1-Hour Close", GetColor(3));