Distribution Testing In ThinkOrSwim

Ah, no data means not enough values to calculate. Duh! That makes sense because there were less than 20 trades on that look-back period. Is there a minimum number of Total Trades you'd like to see to boost confidence in the various percentages?
 

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

Ah, no data means not enough values to calculate. Duh! That makes sense because there were less than 20 trades on that look-back period. Is there a minimum number of Total Trades you'd like to see to boost confidence in the various percentages?

Please understand I believe the ANOVA calculations are correct, but there may be something I've missed. I'll have a professional review it soon. Until then :

Create a watchlist if you haven't already to review results across multiple ETFs, futures etc

Step 1:

Select "nosigin" the below input STCDchoose. The idea is simple enough. It calculates win relationships to signals A & B. This will allow to see if A or B or A&B correlate with C. Review AC and BC and ABC. If one of those is above say %70 or greater and winning ratio is above 70%, go to step 2

def stcCn;
def stcCd;
input STCDchoose = { default standard, nosigwin,nosigloss};
switch (STCDchoose) {
case standard:
stcCn=if STCs and BTOsC and afterentrycount>=1then 1 else 0;
stcCd =1;
case nosigwin:
stcCn =if STCs and exitpriceSTC > entryPriceBTO and afterentrycount>=1 then 1 else 0;
stcCd =2;
case nosigloss:
stcCn =if STCs and exitpriceSTC < entryPriceBTO and afterentrycount>=1 then 1 else 0;
stcCd =3;
}

Step 2:

Just for example, we will say A resulted in 90% relationship to C with a win ratio of %80.

Test the same settings through your watchlist. If you see the same or acceptable results, then A is valid. Go to step 3 .

Make sure to note or write down the results.

If your not seeing the same results, select BTO ABC2 and repeat through to ABC3 until you can go to Step 3.

If you can't find acceptable numbers, go to step 4.



Step 3:

Select "nosigloss" with input STCDchoose. Go through your watchlist. Take notes, write it down , etc.
If the relationship is lower across your watchlist then A is your signal.

If the relationship is still positive from win to loss, it may be two things :
1). Most of your signals came from A so most of the losses may come from A.
2). STC has tight stops so A still may be completely acceptable.
I'll need to add MD,ROR,CAG and SHARPE so a scenario like perfect win results and positive loss results occur. Losses may be so acceptable it doesn't matter.

You may still want to change see different BTO signals, try the third one . If all bust, Step 4


Step 4:


4a. Select different STC settings as your exit may be the issue.

4b Consider changing BTO script settings for ABC. For example, add money flow script from C signal to A or B

4c. Consider changing STC script. I believe the current settings are preferable as I used tight stops.

if all fails step 5

Step 5.

Change A or B indicator signals.

I may do the following soon:

  • add stochastic price or stochastic price with volatility from mobius.
  • use the ANOVA to test optimal gamma percent. I plan to change gamma percent with a fold when for entries and different setting for exists. I believe ehlers and a few others have similar indicators.


Hope that makes sense. Even if you want to review other indicators, using this tool seems to expediate the process..... or I hope so anyway

Lastly, check /ES intraday with multiple aggregations with settings as-is. :)

let me know.

-mcdon
 
Hi Mcd_
I've been using this along with my normal charts and found it quite interesting. As you said, different settings provide different results and you have to play around with them for optimal results. Also curious to see the % success rates move up/down during the day - very useful to see where to focus. Found some results in cl, rb and ho - which are notoriously hard to trade.

I was wondering if you would continue your work and make this study both a long and a short study,so as to capture intraday cycles continuously?

I'm interested and happy to continue the discussion here or privately, thanks!
 
@codydog I will and plan to soon, but I wasn’t concentrating on the indicator itself. That doesn’t mean I don’t have 5 variations already. I need to finish a project first , but will add a short study once that’s complete.
 
I'll look forward to it!

Thanks again.

here https://tos.mx/9wrcBOG

Detailed notes are located at the top. I had to take out the ANOVA. but these signals are the result of the ANOVA tests. I really need a weekend to fine tune as the tests work - winloss ratio is over 70% and most are above 85%. I lost my shirt with Gold a few years back so it would have been nice to have this script.

Additionally, there is an input for long, short or both.

I welcome any input.

-mcdon030
 
@mcdon030 - if you want some help backtesting this strategy let me know and will be more than happy to work with you on a deeper refinement. nice work.
 
@mcdon030 - if you want some help backtesting this strategy let me know and will be more than happy to work with you on a deeper refinement. nice work.

I was hoping to get a little to make a synthetic FPL as TOS's fpl is a little glitchy, but I would take some advice. Even if you can simply point me in the right direction, i would certainly run with it.
 
I was hoping to get a little to make a synthetic FPL as TOS's fpl is a little glitchy, but I would take some advice. Even if you can simply point me in the right direction, i would certainly run with it.
yeah it's quite difficult, i would work to develop a real-time data model and take it out of TOS or put resources to do real-time capture and testing. will do i will look at the code, and provide recommendations in the meantime.
 
@mcdon030 - Hi, great study!

I ran it at 1 D, 2 min (my usual agg) and it worked well. Although tos seems to execute at prices a human can't achieve, i found that even if it was 1/3 of the pnl, it was substantial and suggests that even a modest a/c, trading 1 or 2 lots could make a living using it.

Will run it again tomorrow and see.
 
@mcdon030 - Hi, great study!

I ran it at 1 D, 2 min (my usual agg) and it worked well. Although tos seems to execute at prices a human can't achieve, i found that even if it was 1/3 of the pnl, it was substantial and suggests that even a modest a/c, trading 1 or 2 lots could make a living using it.

Will run it again tomorrow and see.


I was successful papertrading options with 5 , 15 and 30 min aggregation with CSCO, TSLA, DIS and UNH. However, please understand I'm not done yet. The whole idea wasn't the indicator but a path to create one and this was the first step.

The next Anova test is Gamma multiplier for multiple aggregations as mentioned in a previous post. .05 is fantastic daily, but that's really all I'm confident with regards to a gamma multiplier and a particular aggregation. After that, position sizing.

That said, I noticed that I needed to limit intraday signals from occurring after 1545 and initiating stop if currently in an open trade (no overnight trades) so it's added and reversal alerts. Maybe the following will help you since I don't have a trade plan built yet:

indicator with the additions mentioned: https://tos.mx/P559NHT
A watchlist set to 2 mins : https://tos.mx/oI8iO4B


-mcdon
 
Awesome job on this, mcdon! Last month I recorded some data on futures and a few stocks but am not sure how useful it may be.
I looked at the following time frames:

3 Minute chart x 30 Days
5 Minute chart x 180 Days
15 Minute chart x 180 Days
30 Minute chart x 180 Days
1 Hour chart x 360 Days
Daily chart x 360 Days

I was expecting higher win rates with higher time frames, but if I did the test accurately, that was generally not the case.

One of the more interesting things I saw was that Gold, Silver, and Crude futures had 91-96% success rate on Step 1E (AC) on a 15min 180 day chart whereas the indices on the same test had only a 38-76% win rate on that time frame for Step E (AC). Also found that on a 3 min 30 day chart, the YM did very well on step 1F (BC) at 91% but for all other instruments that was the worst result at 53.9% win rate overall.

Again, great work, mcdon! Thank you!
 
@mcdon030 - Thanks. will use it today.

On scan, thanks, but I only watch and trade 5 stocks actively, 5 inactively. I know some scan and trade 100s of names, but I'm not that smart or capable.
 
@mcdon030 - Hi, great study!

I ran it at 1 D, 2 min (my usual agg) and it worked well. Although tos seems to execute at prices a human can't achieve, i found that even if it was 1/3 of the pnl, it was substantial and suggests that even a modest a/c, trading 1 or 2 lots could make a living using it.

Will run it again tomorrow and see.

codydog, did you need to change the default settings when running at a lower aggregation period? I noticed yesterday, on TSLA 1 and 2 min charts specifically, that bigger moves were being missed on the latest indicator study (https://tos.mx/P559NHT) that were not missed before on previous versions. I tried messing with the settings but couldn't quite get it dialed in for those lower time frames.
 
@Dupre - Hi, not really, but I dont trade tsla so couldnt comment with any advice.

My experience with tos is that some symbols' data can get wacky and then clear up magically. I used it on /es
 
Shorted index futures (ES, NQ, YM and RTY) off 3 min chart this morning (paper trading). Gold 15 min short signal also a winner.
 
@mcdon030 I think it works well - but it also suits my trading, which is short term, and higher level of trading than most. Requires a bunch of concentration, but I am hoping others will speak up and use it with money and not paper trading, then we can get some real life experience in a wider universe.

Congrats on your creation!
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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