Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

boute

DTosc for ThinkorSwim

Recommended Posts

Can someone please help me converting this oscilalator to use with Thinkor Swim? Thanks Alot

 

PeriodRSI= Param("PeriodRSI", 13, 1, 250, 1);

PeriodStoch=Param("PeriodStoch", 8, 1, 250, 1);

MAType=Param("MAType", 1, 1, 2, 1);

PeriodSK=Param("PeriodSK", 5, 1, 250, 1);

PeriodSD=Param("PeriodSD", 3, 1, 250, 1);

Upper=Param("Upper", 70, 50, 100, 1);

Lower=Param("Lower", 30, 0, 50, 1);

 

 

StoRSI= 100*(( RSI( PeriodRSI) - LLV( RSI( PeriodRSI ) , PeriodStoch ) ) / ( (

HHV( RSI( PeriodRSI) , PeriodStoch ) ) - LLV(RSI( PeriodRSI ), PeriodStoch ) )

);

 

if(MAType==1)

{

SK=MA(StoRSI,PeriodSK);

SD=MA(SK,PeriodSD);

}

 

if(MAType==2)

{

SK=EMA(StoRSI,PeriodSK);

SD=EMA(SK,PeriodSD);

}

 

Plot(SK,"DTOscSK",ParamColor( "ColorSK", colorBlue ),styleLine);

Plot(SD,"DTOscSD",ParamColor( "ColorSD", colorBlack ),styleDashed);

Plot(0,"ZeroLine",ParamColor( "ColorZero", colorBlack ),styleLine);

Plot(Upper,"Upper",ParamColor( "ColorUpper", colorRed ),styleLine);

Plot(Lower,"Lower",ParamColor( "ColorLower", colorGreen ),styleLine);

Share this post


Link to post
Share on other sites

Based on my research, the DTosc (Detrended oscillator) for thinkorswim can be approximated by using the StocRSI and adjusting it to match the numbers seen in the charts in the book.

 

For example, these settings based on those seen on page 38 of Miner's book High Probability Trading Strategies :

 

RSI length=21

OB = 75

OS = 25

RSI choice = RSI EMA

RSI price = close

k period = 13

d period = 8

slowing period = 8

smoothing type = ema

 

produced a very similar pattern to the DTOSC below the SPX daily chart on page 38. Experiment with it and see if it works for you.

Share this post


Link to post
Share on other sites

I agree with Tams. The description was vague...and you didn't provide much information. What is the name of that oscillator? If it is a detrended oscillator, there is a default "DetrendedPriceOsc" aready built into TOS. I think we would need more information to comment further.

Share this post


Link to post
Share on other sites

Please reread my post--the Thinkorswim indicator that closely approximates Miner's DTosc is the StochRSI. If the settings are changed per my original post, you'll essentially have the DTosc on your screen.

 

As for the name 'detrended oscillator' I found it during my research and simply repeated it for anyone who wondered what "dtosc" meant.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.