Strategy Based on EMAs, TSI, MACD, and Premarket Highs/Lows For ThinkOrSwim

Hello all. I'm new here.
First, thank you @a1cturner for all the work you've done contributing to this forum.

If you wouldn't mind, please update us on the entry/exit process. I've read the first page a few times but I'm still a bit confused.

Okay, so I have my watchlist and I am using your watchlist indicator. Here are some questions that I'm sure others are asking themselves.

1. In the watchlist, what's the difference between "LONG" and "LONG HOLD?"

2. On the 5 min chart, what's the first thing to look for before making an entry? A solid green/red candle? an empty candle with a white arrow and white dash line?

3. What if you don't see the solid green/red candle? What if you just see the white arrow and an empty candle with the white dash?

4. I've noticed that if the bars are too far away from VWAP, that it can be very risky to get into a trade. Any thoughts on this?
 

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

1. Yeah that’s what I meant but if you refer to my previous post, the MACD TSI histogram is really just TSI because the MACD stays around 0. A standard ToS TSI indicator would be fine.
2. Maybe 30 minutes to an hour depending on the day. After trading for a while you will get a “feeling” if the market is going to go up or down that day or end flat. It’s those flat days that ****.
Thank you, can you please share the TSI indicator? I am not able to find it in TOS
 
I didn't know this a month or so ago so I will share my knowledge.

If you want to backtest this strategy easy than first set the lookback period by changing your chart settings to the number of days you want to look back. I use 10 days (10 Days, 10 Minutes).
Next you will go into the strategy settings using the gear icon and turn on "show orders"
Next you will right click on any of the orders that appear and click show report.
This will show all the trades that this strategy would have made assuming 1 trade at a time and 100 shares at a time.

It will look like this.

ZU9uJgv.png
I am very sorry go ask this dump question
How you find strategy setting i cant find it
Next you will go into the strategy settings using the gear icon and turn on "show orders"
 
I think the only thing is missing in this indicator to show momentum of the move In flex grid
Al of the green but only one or two has strong momentum is it volume , ADR,ATR .
I don't know ?

If i want to add this labe inside flex grid
How i do that ADR percentage

declare lower;

input length = 14;

plot ATR = MovingAverage(AverageType.wilders, TrueRange(high, close, low), length);
ATR.SetDefaultColor(GetColor(8));

AddLabel (yes, "ATR:" + Round((ATR / close) * 100, 3) + "%", Color.WHITE);


AddLabel (yes, "ATR:" + round((ATR) , 3), Color.white);


plot ADR = MovingAverage(AverageType.wilders, high-low, length);
ADR.SetDefaultColor(GetColor(6));

AddLabel (yes, "ADR:" + round((ADR) , 3), Color.light_green);

AddLabel (yes, "ADR:" + Round((ADR / close) * 100, 3) + "%", Color.li
Created an indicator and save it as a study set and then load it in each of the grid cell.
Here is your indicator with this study
http://tos.mx/Ihzp3Nj
 
Created an indicator and save it as a study set and then load it in each of the grid cell.
Here is your indicator with this study
http://tos.mx/Ihzp3Nj
The adr not for daily its set for 5 m as flex grid not daily you can change to declare upper; instead of lower
def ATR = WildersAverage(TrueRange(high(period = aggregationPeriod.DAY), close(period = aggregationPeriod.DAY), low(period = aggregationPeriod.DAY)), AtrAvgLength);
I think adding this (period = aggregationPeriod.DAY) will fix this problem
Thank you for your help


check this one
declare upper;
input length = 14;

input AtrAvgLength = 14;



plot ATR = WildersAverage(TrueRange(high(period = AggregationPeriod.DAY), close(period = AggregationPeriod.DAY), low(period = AggregationPeriod.DAY)), AtrAvgLength);
ATR.SetDefaultColor(GetColor(8));

AddLabel (yes, "ATR:" + Round((ATR / close) * 100, 3) + "%", Color.WHITE);


AddLabel (yes, "ATR:" + Round((ATR) , 3), Color.WHITE);


plot ADR = MovingAverage(AverageType.WILDERS, high (period = aggregationPeriod.DAY)- low(period = aggregationPeriod.DAY), length);
ADR.SetDefaultColor(GetColor(6));

AddLabel (yes, "ADR:" + Round((ADR) , 3), Color.LIGHT_GREEN);

AddLabel (yes, "ADR:" + Round((ADR / close) * 100, 3) + "%", Color.LIGHT_GREEN);
 
Last edited:
The adr not for daily its set for 5 m as flex grid not daily you can change to declare upper; instead of lower
def ATR = WildersAverage(TrueRange(high(period = aggregationPeriod.DAY), close(period = aggregationPeriod.DAY), low(period = aggregationPeriod.DAY)), AtrAvgLength);
I think adding this (period = aggregationPeriod.DAY) will fix this problem
Thank you for your help


check this one
declare upper;
input length = 14;

input AtrAvgLength = 14;



plot ATR = WildersAverage(TrueRange(high(period = AggregationPeriod.DAY), close(period = AggregationPeriod.DAY), low(period = AggregationPeriod.DAY)), AtrAvgLength);
ATR.SetDefaultColor(GetColor(8));

AddLabel (yes, "ATR:" + Round((ATR / close) * 100, 3) + "%", Color.WHITE);


AddLabel (yes, "ATR:" + Round((ATR) , 3), Color.WHITE);


plot ADR = MovingAverage(AverageType.WILDERS, high (period = aggregationPeriod.DAY)- low(period = aggregationPeriod.DAY), length);
ADR.SetDefaultColor(GetColor(6));

AddLabel (yes, "ADR:" + Round((ADR) , 3), Color.LIGHT_GREEN);

AddLabel (yes, "ADR:" + Round((ADR / close) * 100, 3) + "%", Color.LIGHT_GREEN);
Thanks for this change.
And how do we use this ADR and ATR to determine the strength of movement with this strategy??
 
Last edited:
I am new to this and will need some hand holding.
I have copied the code to the strategy but it does not show on the chart. Where am I going wrong?
 
@a1cturner I'm porting this over to Ninjatrader and have a question. Can you explain what's going on in the
PREMARKET HIGH/LOW BUY SIGNAL? I'm trying to figure out what the compound value function is doing. There's no such function in Ninjatrader. Would you mind describing in words what the entire premarket signal is doing? Thanks!
 
@a1cturner I'm porting this over to Ninjatrader and have a question. Can you explain what's going on in the
PREMARKET HIGH/LOW BUY SIGNAL? I'm trying to figure out what the compound value function is doing. There's no such function in Ninjatrader. Would you mind describing in words what the entire premarket signal is doing? Thanks!
It’s just the price level. If the price is greater than the premarket high than you would get a long signal if all other parameters aligned. If it is below the premarket low then you will get a short signal if all other parameters aligned.
 
I really like what you are doing here. If you get a minute can you share why I am not getting any up arrows?
8nRS9yX.jpg

Most likely some other parameters weren’t met in the morning and in the afternoon your EMAs were red. I’d have to dig further on that ticker at that time to give an exact answer.
 
I am new to this and will need some hand holding.
I have copied the code to the strategy but it does not show on the chart. Where am I going wrong?
Did you figure it out? I would need more information on how you are copying the code. Link or copy and paste the entire code?
 
Did you figure it out? I would need more information on how you are copying the code. Link or copy and paste the entire code?
Thank you, sorry for my delay. No haven't, but I re-checked all the Yes/No settings, and they are right, so I am guessing it is just a symptom of our terrible market over the time period. I will keep you posted.
 
Hi @a1cturner,

Absolutely amazing work. Well done.

Quick question for you on the white dashes... in your instructions you stated;

If you were patient and waited on the Buy Signal (white arrow) then get in on that 5EMA (green dashed line) or better. Alternatively, if you missed your entry, then try to get in at least on the white dash or better. This was the entry point from the previous candle.

I'm not sure I'm understanding what the white dash means... see example below where I get one before a white arrow and one at the same candle.

vqOvGx0.png


Also interesting that your TSI/MAC line/histogram (which I added some clouds to show the direction) seems to be an early indicator to the regular MACD overall direction.

Thanks in advance.

Regards,
PT_Scalper
 
Hi @a1cturner,

Absolutely amazing work. Well done.

Quick question for you on the white dashes... in your instructions you stated;

If you were patient and waited on the Buy Signal (white arrow) then get in on that 5EMA (green dashed line) or better. Alternatively, if you missed your entry, then try to get in at least on the white dash or better. This was the entry point from the previous candle.

I'm not sure I'm understanding what the white dash means... see example below where I get one before a white arrow and one at the same candle.

vqOvGx0.png


Also interesting that your TSI/MAC line/histogram (which I added some clouds to show the direction) seems to be an early indicator to the regular MACD overall direction.

Thanks in advance.

Regards,
PT_Scalper

Sorry it does get a little confusing. Not sure how else to word it. Basically I added in a buffer for entry on the 5EMA +/- 0.25%. That is one of the many criteria that have to be met to get a white ARROW. Sometimes though you won’t get in on the bar with the white arrow so I added in the white dash. The white DASH represents the level of the previous bar 5EMA +/- 0.25% so that you have a visual reference of a previous entry point that is valid right now. Still a little confusing I know.

All you really need to know is that if the price is between the white dash and the 5EMA you are still getting a good entry. It is as if you had entered at an appropriate price level on the previous bar.

Hope that is as clear as mud.

I stopped using the TSI/MACD histogram and just converted a TSI indicator to a histogram instead. The MACD level of the original code was usually at or around 0 all the time so it made no sense to even include it.
 
Sorry it does get a little confusing. Not sure how else to word it. Basically I added in a buffer for entry on the 5EMA +/- 0.25%. That is one of the many criteria that have to be met to get a white ARROW. Sometimes though you won’t get in on the bar with the white arrow so I added in the white dash. The white DASH represents the level of the previous bar 5EMA +/- 0.25% so that you have a visual reference of a previous entry point that is valid right now. Still a little confusing I know.

All you really need to know is that if the price is between the white dash and the 5EMA you are still getting a good entry. It is as if you had entered at an appropriate price level on the previous bar.

Hope that is as clear as mud.

I stopped using the TSI/MACD histogram and just converted a TSI indicator to a histogram instead. The MACD level of the original code was usually at or around 0 all the time so it made no sense to even include it.
Great thank you @a1cturner.

Yes true... just realized looking at the code that it's just the TSI line and histogram and not MACD.
 

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
258 Online
Create Post

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