Tracking Bullish/Bearish signals for day trading

shakib3585

Active member
VIP
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)

8xVWnAw.png



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:
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 based on 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 some stocks are having bearish reversals soon after their price action started, which I didn't understand before. I have attached price action for two stocks for reference

Bearish example: (HCTI @ 03/06/2023)
Bullish example: (AZUL @ 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

hello, here are some comments to help you make more informative posts, in order to get more responses.

this is a programming site. please post code in a code window.
( look for the </> icon in header)
sometimes, looking at the code can determine what is wrong.

what does this mean?
...soon after their price action started...
started what? what did price do?

again, this is a programming site. programming is specific. there is no 'price action' parameter. say close, or high, or low. what are you really looking at?

sorry, i have no idea what i am supposed to look at in those images with 5 charts. when i see full screen images like this, with no markings added, i ignore them.

if your study is an upper, then just show the upper chart. if your study is a lower chart, then show the upper, and just that 1 lower chart, and tell us it's a lower chart. you didn't tell us what you study does or what chart it loads into.

edit the image, draw some lines or circles, to highlight the area that we are supposed to look at. I use the snipping tool often to do this.
https://www.digitalcitizen.life/how-use-snipping-tool/
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

hello, here are some comments to help you make more informative posts, in order to get more responses.

this is a programming site. please post code in a code window.
( look for the </> icon in header)
sometimes, looking at the code can determine what is wrong.

what does this mean?
...soon after their price action started...
started what? what did price do?

again, this is a programming site. programming is specific. there is no 'price action' parameter. say close, or high, or low. what are you really looking at?

sorry, i have no idea what i am supposed to look at in those images with 5 charts. when i see full screen images like this, with no markings added, i ignore them.

if your study is an upper, then just show the upper chart. if your study is a lower chart, then show the upper, and just that 1 lower chart, and tell us it's a lower chart. you didn't tell us what you study does or what chart it loads into.

edit the image, draw some lines or circles, to highlight the area that we are supposed to look at. I use the snipping tool often to do this.
https://www.digitalcitizen.life/how-use-snipping-tool/
edited the original question @halcyonguy
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
464 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top