SLIM Ribbon Indicator for ThinkorSwim

Here is a backtest of the 30 minute chart (2018 - present)

PjA0sPV.png


And a 5 minute chart (December 2018 - present):

JqSA8Mv.png
 

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

I sure hope the backtest wasnt on my post of a set up, because no set up can be followed 100% because of changing market conditions, especially this volatile market. I wouldnt use this unless it's set up in a way understood by me, my set up, and monitored if market movement requires management, as it does. I personally use a simple system of trend, no complicated formulas, algorithms, earnings plays, etc......mainly working off important scans......
 
I sure hope the backtest wasnt on my post of a set up, because no set up can be followed 100% because of changing market conditions, especially this volatile market. I wouldnt use this unless it's set up in a way understood by me, my set up, and monitored if market movement requires management, as it does. I personally use a simple system of trend, no complicated formulas, algorithms, earnings plays, etc......mainly working off important scans......

I backtested the code that was in the original post in this thread, because the poster asked for backtesters.

By definition, the backtest took every trade that the strategy signaled. My goal is to take myself out of the equation. I don't want to think about all those external factors you listed.
 
I backtested the code that was in the original post in this thread, because the poster asked for backtesters.

By definition, the backtest took every trade that the strategy signaled. My goal is to take myself out of the equation. I don't want to think about all those external factors you listed.
Unfortunately, external factors, black swan events are the factors that need to be aware of. Here's a site that maybe some use.
 
What do you use to backtest?
I don't know how to backtest, or what to use?? I just trade, as my account grows, I know I'm trading well,....take profits in strength, alway adding money to the account. I spent a year and a half working with Doug learning options, and follow my plan,.......example is video with explanation,
at this point I'm a position trader, and swing on daily........https://youtu.be/zSK9Vmw0MrY
 
What do you use to backtest?

I use Excel / Power Query. I wrote a query that will transform the backtest report .cvs files from ThinkorSwim into a spreadsheet that can be used for charting / analysis.

It's not perfect, as it only works if trading a simple enter / exit strategy with a fixed lot size. It doesn't work with complicated entries, options, position increases, partial exits, etc. It is also monotonous to go get all of the reports from thinkorswim using OnDemand, but I haven't found a better way.

It's still a work in progress - I will share with the community at some point.
 
I use Excel / Power Query. I wrote a query that will transform the backtest report .cvs files from ThinkorSwim into a spreadsheet that can be used for charting / analysis.

It's not perfect, as it only works if trading a simple enter / exit strategy with a fixed lot size. It doesn't work with complicated entries, options, position increases, partial exits, etc.

It's still a work in progress - I will share with the community at some point.
Sorry I could add any ammo to the subject, Tradinformed was something I thought looked great, but I couldn't figure out his ecel and then he went and made it a pay site, so I ran.
 
Sorry I could add any ammo to the subject, Tradinformed was something I thought looked great, but I couldn't figure out his ecel and then he went and made it a pay site, so I ran.
I use Doug's lessons on value plays, out of favor, or MOMO.........
 
I am trying to break down the code in this strategy and am confused. Can anyone help me understand how this line in the original code works?

Code:
def ST = if close < ST[1] then UP else DN;

it is defining ST, using ST[1]. "ST" is nowhere in the code prior to this line, so it seems like a circular reference. How (and what) are we referencing when using the ST[1] in the definition of ST?

The code seems to work, as it doesn't create an error in my thinkscript editor, but I have no idea HOW it works or what it is calculating. Can anyone help?
 
I am trying to break down the code in this strategy and am confused. Can anyone help me understand how this line in the original code works?

Code:
def ST = if close < ST[1] then UP else DN;

it is defining ST, using ST[1]. "ST" is nowhere in the code prior to this line, so it seems like a circular reference. How (and what) are we referencing when using the ST[1] in the definition of ST?

The code seems to work, as it doesn't create an error in my thinkscript editor, but I have no idea HOW it works or what it is calculating. Can anyone help?
"ST," supertrend,....if the close less than supertrend yesterday, then up, else down
 
Yes - I understand that is what it is referencing, I just don't understand where SuperTrend is defined in the code. I am hoping someone can explain to me how a recursive command like this works in thinkscript.
 
@DBSully It's magic. ;)

Think about the only variable in the code. Maybe that will tell you what ST is defined as.

That is my confusion. The only reference to ST and Supertrend in the entire code is here:

Code:
def ST = if close < ST[1] then UP else DN;

plot SuperTrend = ST;
SuperTrend.AssignValueColor(if close < ST then Color.RED else Color.GREEN);
SuperTrend.SetHiding(hideSuperTrendAtr);

def SuperTrendUP = if ST crosses below close[-1] then 1 else 0;
def isSuperTrendUP = SuperTrend > close;
def SuperTrendDN = if ST crosses above close[-1] then 1 else 0;
def isSuperTrendDN = SuperTrend < close;

I see this as "If close < ST from the last bar, then UP, otherwise DOWN"

My understanding is that this is a recursive statement, so you need to define what ST is. But the next line plots ST, and calls it "SuperTrend". I expected that ST or SuperTrend would be calculated somewhere in the code. I just can't seem to find that, and don't understand what is being calculated if SuperTrend and ST just keep referencing each other.

Apologies for taking this thread on a tangent. I will stop after this post, but if anyone can point me to the solution or clarify for me, I would appreciate it.
 
Last edited:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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