Greetings all,
Based on countless analyses, I have built an indicator that is very helpful to track bullish/bearish long signals and reversals. I've used the indicator on different stocks and found it well suited to tracking long signals. The indicator is made by combining Heiken Ashi price action with exponential moving averages from three different histogram approaches (I've included a link below). The only problem I have right now is that I cannot track bearish reversals. I have attached the price action for HCTI for reference. The green circled shows for bullish reversals whereas red circled shows bearish reversals
Example: (HCTI @ 03/06/2023)
The TOS link for the study : http://tos.mx/R8zKyo7
If anyone can help to modify the code so as it can trace bearish reversals, it would be a great help.
Thanks,
Fai
Based on countless analyses, I have built an indicator that is very helpful to track bullish/bearish long signals and reversals. I've used the indicator on different stocks and found it well suited to tracking long signals. The indicator is made by combining Heiken Ashi price action with exponential moving averages from three different histogram approaches (I've included a link below). The only problem I have right now is that I cannot track bearish reversals. I have attached the price action for HCTI for reference. The green circled shows for bullish reversals whereas red circled shows bearish reversals
Example: (HCTI @ 03/06/2023)
The TOS link for the study : http://tos.mx/R8zKyo7
If anyone can help to modify the code so as it can trace bearish reversals, it would be a great help.
Thanks,
Fai
Code:
declare lower;
input timeFrameOne = AggregationPeriod.THree_MIN;
input timeFrameTwo = AggregationPeriod.THirty_MIN;
input timeframe_for_reference = AggregationPeriod.THree_MIN;
input emaLength_for_all = 30;
input emaLength_for_reference = 55;
input lookbackperiod_for_all = 5;
input lookbackperiod_for_reference = 3;
def priceClose1 = close(period = timeFrameOne);
def priceOpen1 = open(period = timeFrameOne);
def priceHigh1 = high(period = timeFrameOne);
def priceLow1= high(period = timeFrameOne);
def priceClose2 = close(period = timeFrameTwo);
def priceOpen2 = open(period = timeFrameTwo);
def priceHigh2 = high(period = timeFrameTwo);
def priceLow2= high(period = timeFrameTwo);
def priceClose3 = close(period = timeframe_for_reference);
def priceOpen3 = open(period = timeframe_for_reference);
def priceHigh3 = high(period = timeframe_for_reference);
def priceLow3= high(period = timeframe_for_reference);
def maOne1 = MovAvgExponential(priceClose1, emaLength_for_all);
def haClose1 = (priceOpen1 + priceHigh1 + priceLow1 + priceClose1) / 4 ;
def haOpen1 = (haOpen1[1] + haClose1[1]) / 2 ;
def valueOne = ((haClose1 – haClose1[lookbackperiod_for_all]) / haClose1[lookbackperiod_for_all]) * 100;
def valueTwo = ((maOne1 – maOne1[lookbackperiod_for_all]) / maOne1[lookbackperiod_for_all]) * 100;
def data1 = valueOne + valuetwo;
def maOne2 = MovAvgExponential(priceClose2, emaLength_for_all);
def haClose2 = (priceOpen2 + priceHigh2 + priceLow2 + priceClose2) / 4 ;
def haOpen2 = (haOpen2[1] + haClose2[1]) / 2 ;
def valueOne2 = ((haClose2 – haClose2[lookbackperiod_for_all]) / haClose2[lookbackperiod_for_all]) * 100;
def valueTwo2 = ((maOne2 – maOne2[lookbackperiod_for_all]) / maOne2[lookbackperiod_for_all]) * 100;
def data2 = valueOne2 + valuetwo2;
def maOne3 = MovAvgExponential(priceClose3, emaLength_for_reference);
def haClose3 = (priceOpen3 + priceHigh3 + priceLow3 + priceClose3) / 4 ;
def haOpen3 = (haOpen3[1] + haClose3[1]) / 2 ;
def valueOne3 = ((haClose3 – haClose3[lookbackperiod_for_reference]) / haClose3[lookbackperiod_for_reference]) * 100;
def valueTwo3 = ((maOne3 – maOne3[lookbackperiod_for_reference]) / maOne3[lookbackperiod_for_reference]) * 100;
def data3 = valueOne3 + valuetwo3;
def pattern = data1>data1[1] and data2>data2[1] and data3>data3[1];
plot signal = if pattern then 1 else 0;
Last edited: