1 Minute TSI with 10 Minute EMA Cloud Momentum Indicator

a1cturner

Well-known member
I need help with the last part of this study. Updated Code: http://tos.mx/t0QVyfO

Background. This will only work on a One Minute Chart. It measures that the True Strength Index is above 25 on a 1 minute chart and both the 5/12 EMAs and 34/50EMAs are Bearish on a 10 minute chart or vice versa that the True Strength Index is below -25 on a 1 minute chart and both the 5/12 EMAs and 34/50 EMAs are Bullish on a 10 minute chart.

It plots a green arrow on the lower study when I am to set a TRAILING buy order to catch a short reversal in a strong trend.

So far it looks very promising except for when the reversal turns out to more than a short reversal and turns into a trend change.

The difference for me between a short reversal and a trend change is when the bearish 5 EMA crosses back above the 12 EMA or vice versa when the bullish 5 EMA crosses back below the 12 EMA.

All I want to do is add something (a red arrow) to the end of the code that visually tells me that the signal is no longer valid because of the trend change (5EMA crosses above 12EMA or vice versa 5EMA crosses below 12EMA).

I have tried a few different things but it just changes my original arrows to red.

If someone can give it a shot please I would appreciate it! It shouldn't be more than 2-4 more lines of code.

P.S. Every chart that I have looked at where this triggers would have worked out perfectly except one or two.

Once I get it perfected then I can build a scanner.

S3lbvil.png



If I had a trailing buy order in I would have just canceled it when the EMAs crossed and I have full confidence that it would not have been a problem.


l68G9Xk.png
 
Last edited:

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

Still need help on that last bit of code...

Bull Scan: http://tos.mx/T7rlmQI
Bear Scan: http://tos.mx/7vyD5TH

I added MACD into the scan for a stronger indicator.

P.S. Made 140% on AAPL puts this morning with the indicator above. $0.03 trailing buy when indicator triggered and out with a $0.03 trailing stop.
Hi, when the indicator is at the extreme like below -25 is that when you are looking for a long?
 
Yes. When the general trend is bullish but the indicator is at -25, it is for lack of better words, a short term reversal. Vice versa for a bear trend and 25.

I have discovered two things. The MACD needs to match the 10 minute trend, I am trying to add that in now. And the other is that the trailing buy order should be 10% for options or you may get in too early. My trailing buy is based on bid price.

Today AAPL made me some money and CSCO shouldn’t have triggered because of the MACD. (Still up 40% on CSCO because it respected the EMAs).

I still haven’t figured out the best sell signal but I usually just watch the EMAs and VIX and trail stop it by 10%-15%. My trailing stop is based on ask price.

I have no price target and I know I am missing out on 20%-25% with the trailing stops but I’m just trying to book a gain and not peg the top or bottom. (I only trade options. Usually Delta 50 or close to it.)
 
Yes. When the general trend is bullish but the indicator is at -25, it is for lack of better words, a short term reversal. Vice versa for a bear trend and 25.

I have discovered two things. The MACD needs to match the 10 minute trend, I am trying to add that in now. And the other is that the trailing buy order should be 10% for options or you may get in too early. My trailing buy is based on bid price.

Today AAPL made me some money and CSCO shouldn’t have triggered because of the MACD. (Still up 40% on CSCO because it respected the EMAs).

I still haven’t figured out the best sell signal but I usually just watch the EMAs and VIX and trail stop it by 10%-15%. My trailing stop is based on ask price.

I have no price target and I know I am missing out on 20%-25% with the trailing stops but I’m just trying to book a gain and not peg the top or bottom. (I only trade options. Usually Delta 50 or close to it.)
For a quick target if the days range is not complete or the day is early in time and not much range has been completed, just scale at 30% of the range and 50% and that should get you at least a portion of the daily move
 
Okay I think I have fixed everything. I didn't need the last part of the code as I thought I would once I added the MACD parameters.

Of note: I use a different MACD than standard because I feel like I get the signals maybe 1 bar faster.

Here is the final study with notes at the top and scan links at the bottom: http://tos.mx/t0QVyfO

Call Scanner: http://tos.mx/6bpN0dw
Put Scanner: http://tos.mx/u80W8xp

Any feedback is welcome of course!

Updated due to error with MACD
 
Last edited:
Very Very Very Limited Backtest Completed. On Demand really lacks so I had to just manually go find all this info.

Few things of note. Since OnDemand lacks I resorted to using the options price chart so I couldn't see the Delta, Bid, or Ask. I just went off Open, High, and Low. This could most definitely skew the results. Also there were a few trades that happened at the same time. Since I am using my entire account balance (in theory) on each trade, these simultaneous trades couldn't happen. Finally, I was just looking for the indicator to trigger on a specific watchlist that I have where I have drawn trend lines (named trend lines complete, lol). This watchlist has 21 tickers including TSLA, AAPL, QQQ, IWM, SPY, PFE, AMD, NVDA, TSM, CCL, DKS, etc.

Backtest Dates were Monday, Feb 14 to Friday, Feb 18. Since I am not directionally biased I don't think the timing matters....but maybe it does, IDK.

Also, this is assuming that I am lighting fast at putting in orders which I am not.

Total Triggers - 18
Total Trades - 7
Total Canceled Buy Orders due to indicator "stopping" prior to order fill - 3
Total Number of Triggers ignored due to time of day (after 14:30 CST) - 7
Total Number of Triggers ignored due to low or no volume - 1

Starting Balance - $2,000
Wins - 6
Losses - 1
Max Value - $54,958 with commissions factored in
Value at COB on Friday - $30,756 with commissions factored in

One trade, PFE on 2/17/22 was very close. It could have been a winner or loser depending on where the orders filled. If that would have been a loss than Value at COB on Friday would have been reduced to $12,570 with a Max Weekly Value of $22,467.

Overall I am still happy with the results. Total weekly profit was 1,537% with a Max weekly value of 2,747%

What I need help with:
BACKTESTING APPROPRIATELY. If anyone has the ability to run this indicator through 1000+ trades than I would be much more confident.
Limits and Stops. Currently I have an OCO Order with a 10% Trailing Buy on the Bid, 45% Trailing Stop on the Ask and 105% Limit on the Ask.

I know that this is a very loose backtest with many holes but please let me know if there is something I am blatantly missing.

KoNUToG.png
 
Last edited by a moderator:
Very Very Very Limited Backtest Completed. On Demand really lacks so I had to just manually go find all this info.

Few things of note. Since OnDemand lacks I resorted to using the options price chart so I couldn't see the Delta, Bid, or Ask. I just went off Open, High, and Low. This could most definitely skew the results. Also there were a few trades that happened at the same time. Since I am using my entire account balance (in theory) on each trade, these simultaneous trades couldn't happen. Finally, I was just looking for the indicator to trigger on a specific watchlist that I have where I have drawn trend lines (named trend lines complete, lol). This watchlist has 21 tickers including TSLA, AAPL, QQQ, IWM, SPY, PFE, AMD, NVDA, TSM, CCL, DKS, etc.

Backtest Dates were Monday, Feb 14 to Friday, Feb 18. Since I am not directionally biased I don't think the timing matters....but maybe it does, IDK.

Also, this is assuming that I am lighting fast at putting in orders which I am not.

Total Triggers - 18
Total Trades - 7
Total Canceled Buy Orders due to indicator "stopping" prior to order fill - 3
Total Number of Triggers ignored due to time of day (after 14:30 CST) - 7
Total Number of Triggers ignored due to low or no volume - 1

Starting Balance - $2,000
Wins - 6
Losses - 1
Max Value - $54,958 with commissions factored in
Value at COB on Friday - $30,756 with commissions factored in

One trade, PFE on 2/17/22 was very close. It could have been a winner or loser depending on where the orders filled. If that would have been a loss than Value at COB on Friday would have been reduced to $12,570 with a Max Weekly Value of $22,467.

Overall I am still happy with the results. Total weekly profit was 1,537% with a Max weekly value of 2,747%

What I need help with:
BACKTESTING APPROPRIATELY. If anyone has the ability to run this indicator through 1000+ trades than I would be much more confident.
Limits and Stops. Currently I have an OCO Order with a 10% Trailing Buy on the Bid, 45% Trailing Stop on the Ask and 105% Limit on the Ask.

I know that this is a very loose backtest with many holes but please let me know if there is something I am blatantly missing.

KoNUToG.png
Well done bro. Is the buy signal supposed to be on the chart or on the lower part?
 
Well done bro. Is the buy signal supposed to be on the chart or on the lower part?

It is on the lower study. It does not trigger very often though and I think there might be up to a 10 minute delay due to repainting. I could be wrong on the last part but if that is the case than that is not good.

I am working on a watchlist indicator that when paired with the TSI will give a faster signal. I will post when I am done.

Also I updated all post with updated code and updated scanner links due to a MACD coding issue.

More testing to come.
 
Here is the link to the two watchlist indicators.

MoMo: http://tos.mx/HYabygX
TSI: http://tos.mx/wtzvs9J

These are used together to "counter" the delay in results on the study.

Put the TSI next to the MoMo Indicator. If it says "-25 Call" and the TSI is less than -25 than you should have a green arrow on the lower study or at least have the criteria for the green arrow. If it says "25 Put" and the TSI is greater than 25 than you should have a green arrow on the lower study or atleast have the criteria for a green arrow.

TQNg29n.png


What the green arrows will look like

uFNbhTL.png
 
Here is the link to the two watchlist indicators.

MoMo: http://tos.mx/HYabygX
TSI: http://tos.mx/wtzvs9J

These are used together to "counter" the delay in results on the study.

Put the TSI next to the MoMo Indicator. If it says "-25 Call" and the TSI is less than -25 than you should have a green arrow on the lower study or at least have the criteria for the green arrow. If it says "25 Put" and the TSI is greater than 25 than you should have a green arrow on the lower study or atleast have the criteria for a green arrow.

TQNg29n.png


What the green arrows will look like

uFNbhTL.png
Thanks a lot. I am also right next door to you in Grand Prairie.
 
Last edited by a moderator:
Got some more backtesting done today. It took me hours to run 10 trades through OnDemand. It is not friendly.

I was able to accurately pick the correct delta option using on demand so that is why the prices are different from the first backtest on a few tickers. I also removed one ticker because the trade would not have gone through because it took so long to fill and the rule is that you cancel your buy order if the indicator disappears (or maybe 1 minute later). More research needed for this since I may have a repainting issue. I'l have to test in live trading.

I did discover that my theory about 50 Delta or higher is definitely better. I ran two different trades using other deltas and the results were that the 35 Delta was down 10% when I sold my 72 Delta for a 30+% profit but a Delta 49 sold for 39.31% when I sold my 68 Delta for 30+%. The downside of the lower delta is that it may trigger the 30% stop which is what I had in place for this test.

I had a total of 9 executed trades from 2/15/22 - 2/25/22. The average time in the trade was 0:45. The longest time was 2 hours 24 minutes and the shortest was 1 minute 59 seconds. All 9 trades were winners, meaning I hit a 30% take profit target. More on that below. My total beginning balance was $2,000 and after the 9 trades if I reinvested all capital my balance would be $22,428.22 (this figures commissions). Fun fact. It only takes 25 trades at 30% to turn $2,000 into $1M.

A lot of these trades went on to a 50%, 60% and up to 140% gain so I will modify my strategy to this.

When the indicator hits I will place a buy order for a 10% trailing stop on the bid. If that triggers while the indicator is still up than the trade is good. If not....well that is to be determined. As soon as the order fills I will set a stop market order 30% below my fill price. You have to let this work. CCL for instance ran up and down positive to negative many times before finally hitting my take profit target. One trade even hit -27.75% before going back up. Once I hit my profit target of 30% and a little above I will set a stop market order at the 30% mark and a 10% trailing stop market order. If for some reason I haven't sold by the end of the day than I will replace my order with a market order about 1 minute til close. If you don't understand the 30% stop market and the 10% trailing stop market order than let me explain. If the price has hit your target of 30% at $1.30 and the price goes up to $1.31 I will set a stop market at $1.30 and a trailing stop which will sit at $1.17ish. If the price goes up to say $1.50 than my trialing stop will have surpassed my stop market order of $1.30 and will now be at $1.35. This guarantees that I lock in the 30% gain while still having the ability to stay in the trade longer.

Long story short I am very happy with this indicator. It does not trigger often and you have to be fast but if you can get in when it's there, than there is money to be made.

Again, the last issue I have to keep my eye on is repainting since I am using two time frames. That is why I added the watchlist indicators to hopefully get in on time. We will see how it works on Monday if I get any trades at all.

Fc4zDAk.png
 
This is awesome backtesting, really amazing job. Quick question. Did you notice any repainting of your indicator in live backtesting? This could occur because of the secondary time aggregation.
 
Possibly. It’s was kinda hard to tell. I have another very similar indicator and I noticed I didn’t have any arrows for a few minutes and then all of a sudden I had 5 or 6 in a row. Hard to explain.

I created a watchlist indicator (above) to try and combat that issue. Using the TSI 1 minute as one watchlist indicator and the MACD/EMA (Momo) 10 minute on the other watchlist indicator. With that I have a visual representation of what is going on live and I will be able to find out if the indicator pops up on the lower study whenever it should. Either way, the watchlist indicators should give me a timely entry.

More to come.
 
Caught this one live. Didn't buy due to low options volume. The scanner alerted me about 4-5 minutes after the first trigger. I actually caught the 5th arrow disappearing because the TSI dropped below 25. The watchlist has been updated to add color. Dark Green MoMo with Dark Green TSI is a call buy. Dark Red MoMo with Dark Red TSI is a put buy. Dark Red MoMo with Regular Red TSI is a "get ready to buy a put" and Dark Green MoMo with a Regular Green is a "get ready to buy a call". The colors must be the same for it to be valid. i.e. dark green with dark green or dark red with dark red.

I also added the orange line on the study which shows the percentage above or below between the 5 EMA and the 12 EMA.

So far very happy with the changes but the scan is a little too slow. I will just keep watching my watchlist for opportunities.....AMD was just a half point away on the TSI from being a call buy on the morning dip around 08:44 CST which would have been a winner. (around 50+% so far) but I am sticking by my rules and since it didn't trigger, I didn't buy.

oUOdsmG.png



Now that I look at it the orange line is showing -0.4 but up top it shows 0.26....I don't know why that is. Maybe that is the price above the 12EMA even though I didn't code that....?
 
Last edited:
What I have noticed in live trading. You have to pay attention to the MACD and EMAs. If the 5 is super close to the 12 and it looks like it will probably cross than it probably will. You will get the indicator right now but when it crosses even some of the previous indicators will disappear (those which fell in the 10 minute candle that the crossover happened) because of repainting. I haven't come up with a firm number yet on the orange line but when I do I will probably build that in to the code too. You could probably still make 10% if you happen to get filled but don't hope for that 30% gainer if the trend has changed on the EMAs.

I have honestly seen the most potential for this indicator on Fridays with 0DTE options. I also wouldn't trade this after 1200 CST.

Any ideas, observations, or suggestions?
 
If you could catch something like SQ just before market open I think you would do well. The other time the indicator fired you would not have been filled because of the trialing stop loss and the price direction.

7Xdwfwt.png
 
This is what the buy indicators should look like on your watch list. All you have to do is go to look at the volume and then check the chart and make a decision on what you think the market will do.

This is just another tool and definitely not the end all be all.

bn4IGb0.png
 
Changed up the indicator a little bit to add a "get ready" arrow when the TSI crosses -18 or 18 depending on the direction. I caught AMD this morning but it never crossed -25. Had I bought when my gut told me to I would have been well up right now.

Scans in the bottom of the code: http://tos.mx/bA6I0z1
 
Can anyone tell me how to add this to the current code? I want to know if the 10 minute 5EMA is Greater then the 10 minute 12EMA for VIX and vice versa if the 10 minute 12EMA is greater then the 10 minute 5EMA for VIX.

This would move between symbols but it would always look at the state of the VIX EMAs. Point being to not buy against the market trend.

I noticed a couple triggers for calls this morning that wouldn't have been the most optimal trades due to the state of the market. Puts would have dominated
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
408 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