CSA Trading Dashboard for ThinkorSwim

@diazlaz where did you find that SSL indicator? I didn't see that posted here at all...
Hi @HighBredCloud, a version of the SSL indicator was posted in the warehouse, I don't think I will be able to make that code available as it's available to members of the warehouse. I ported a number of SSL's indicators in the past, let me look, I think I have another indicator that can be a supplement to the SSL.
 
Hi @HighBredCloud, a version of the SSL indicator was posted in the warehouse, I don't think I will be able to make that code available as it's available to members of the warehouse. I ported a number of SSL's indicators in the past, let me look, I think I have another indicator that can be a supplement to the SSL.
I'd buy the actual indicator...I just didn't see it...Let me check the warehouse...Does it repaint? Do the signals come in early enough? Its kinda hard to tell from the pix...
 
@diazlaz
Hey anyways...I am browsing OneDrive files that @markos posted a while back...found here:

https://onedrive.live.com/redir?res...09.25.|30461c4b-420e-4b83-b56f-55faf5d1461b/)
and I found some interesting studies there that I would need help converting into the dots to go along with the CSA study...would you be interested in some parts of this? I just want options in which 3 or 4 studies in the CSA study to use...I don't want people to get the wrong idea and think that there is like 10 indicators in the CSA study...I just want to the ability for others to pick and choose and make their own CSA study by copying and pasting the code...Any idea how to go about this?
 
@diazlaz
Hey anyways...I am browsing OneDrive files that @markos posted a while back...found here:

https://onedrive.live.com/redir?res...09.25.|30461c4b-420e-4b83-b56f-55faf5d1461b/)
and I found some interesting studies there that I would need help converting into the dots to go along with the CSA study...would you be interested in some parts of this? I just want options in which 3 or 4 studies in the CSA study to use...I don't want people to get the wrong idea and think that there is like 10 indicators in the CSA study...I just want to the ability for others to pick and choose and make their own CSA study by copying and pasting the code...Any idea how to go about this?
if you can list the indicators and code, we can take alook, it's really all about the effort, everything can be done with time.

I would recommend instead you consider separating them out into individual indicators, then you can add them as lower studies, will provide you the flexibility to mix and match them instead of modifying code. Something as such:

M0q30Jk.png


Just add the studies you want and you can always save it off as a template for your analysis and trading.
 
@diazlaz I like your idea too...but for me the single study as in your picture just the header alone takes quite a bit of space away from the chart causing the upper section to be more condense...

I don't know if you noticed or not BUT it does not matter if you have 1 indicator or 5 indicators in the CSA study...it all takes up the same amount of space...vs having 5 indicators separately.

The ONLY downfall by having lets say 5 indicators in a single CSA study is that the header will try to display all 5 headers mixed into one and the info that's found in the header will be lost...whereas yours way will be a single header for each indicator. However, the CSA study is not so much based on the info found in the header...for such purposes you're probably better off with the actual study and not the dot version of it. Please refer to the pic of what I am talking about:


With that in mind...do you think it would be just easier to add on additional lines to the original CSA study and have the end user chose what they want to use and what not? For example...The current CSA study has 5 indicators...

LINE 1 is MACD
LINE 2 is Stochastic FULL DIFF
LINE 3 is FREMA
LINE 4 is PPO
LINE 5 is Universal Oscillator

IF you were to add on LINE 6 of lets say the TREND by Oscillator Area or Time attached here...you could easily change the position of the dots where it needs to be displayed by changing a simple line in the code to make your own sequence just how you want it.


Let's say for sake of the argument that this CSA study grows to 20 different types of indicators consisting of Trend, Momentum, Volatility etc...The end user will be able to choose what indicators they want either based on the criteria or multiple indicators from the same "family" to form their own CSA study.

Not only that but in theory one would be able to customize their own CSA study based on intraday or long term swing trade given the indicators of their liking.

AND by simply unchecking "show plot" from the user interface the end user could achieve a single variant of the study as you suggested in your picture.

Further more many coders who are available would be able to contribute to such a CSA study and not just a single coder...based on their own time availability and or preference to a specific type of indicator they would like to convert...or simply just contribution to the CSA study and the community who would find this valuable.

What do you think? Would that be the easiest way to go about this? If so and if you are interested I have a request for you below for LINE 6 of the CSA study.

Code:
# Trend by Oscillator Area or Time 

# Nube v.01 1.8.18

# Nube v.02 1.9.18 - Added area method to original time only

# Used with MACD Diff here, but can be used with any oscilator. 

# Replace Diff in indicator = Diff with your plot of choice 

#Hint: Compares oscillator time above and below a level to determine trend

 

declare lower;

 

plot Diff = MACD().Diff;

     Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

     Diff.DefineColor("Negative and Up", Color.DARK_RED);

     Diff.DefineColor("Negative and Down", Color.RED);

     Diff.DefineColor("Positive and Up", Color.GREEN);

     Diff.DefineColor("Positive and Down", Color.DARK_GREEN);

     Diff.SetLineWeight(3);

 

Diff.AssignValueColor

(

if    Diff < 0 

then  if   Diff > Diff[1] 

      then Diff.color("Negative and Up") 

      else Diff.color("Negative and Down")

else  if   Diff > Diff[1] 

      then Diff.color("Positive and Up") 

      else Diff.color("Positive and Down")

); 

 

 # Trend by Oscillator Area or Time

 # Nube 1.9.18

 

input Style     = { Default Area, Time }; #hint Style: Meathod used for determining trend 

input AboveThis = 0.0; #hint AboveThis: Value above which to count uptrend time 

input BelowThis = 0.0; #hint BelowThis: Value below which to count downtrend time

 

def indicator = MACD().Diff; # <- Your plot here

 

def Up;

def Down;

switch (Style) {

case Area:

    Up   = indicator - AboveThis;

    Down = BelowThis - indicator;

case Time:

    Up   = indicator >= AboveThis;

    Down = indicator <  BelowThis;

};

 

def UpCount = if   indicator crosses above AboveThis

              then Up 

              else UpCount[1] + Up;

def DnCount = if   indicator crosses below BelowThis

              then Down

              else DnCount[1] + Down;

                

def UpMeasure = if   indicator crosses below AboveThis     

                then UpCount

                else UpMeasure[1];

def DnMeasure = if   indicator crosses above BelowThis

                then DnCount

                else DnMeasure[1];

 

def TrendUp   = UpMeasure >= DnMeasure;

def TrendDown = DnMeasure >  UpMeasure;

                

addlabel(TrendUp, " Trend: Up ", Color.UpTick);

addlabel(TrendDown, " Trend: Down ", Color.DownTick);

  #f/ Trend by Oscillator Area or Time
 
if you can list the indicators and code, we can take alook, it's really all about the effort, everything can be done with time.

I would recommend instead you consider separating them out into individual indicators, then you can add them as lower studies, will provide you the flexibility to mix and match them instead of modifying code. Something as such:

M0q30Jk.png


Just add the studies you want and you can always save it off as a template for your analysis and trading.
Hi @diazlaz could you please share the code for this chart? I've got something I would like to try out. I appreciate it.
Markos
 
Hi @diazlaz could you please share the code for this chart? I've got something I would like to try out. I appreciate it.
Markos
Hi @markos, let me see what I can scrub and share, some of it's proprietary trading, I will ask and see what I can make public, in the meantime is there some aspect or idea you want to experiment with? I will be in touch shortly.
 
@diazlaz I like your idea too...but for me the single study as in your picture just the header alone takes quite a bit of space away from the chart causing the upper section to be more condense...

I don't know if you noticed or not BUT it does not matter if you have 1 indicator or 5 indicators in the CSA study...it all takes up the same amount of space...vs having 5 indicators separately.

The ONLY downfall by having lets say 5 indicators in a single CSA study is that the header will try to display all 5 headers mixed into one and the info that's found in the header will be lost...whereas yours way will be a single header for each indicator. However, the CSA study is not so much based on the info found in the header...for such purposes you're probably better off with the actual study and not the dot version of it. Please refer to the pic of what I am talking about:


With that in mind...do you think it would be just easier to add on additional lines to the original CSA study and have the end user chose what they want to use and what not? For example...The current CSA study has 5 indicators...

LINE 1 is MACD
LINE 2 is Stochastic FULL DIFF
LINE 3 is FREMA
LINE 4 is PPO
LINE 5 is Universal Oscillator

IF you were to add on LINE 6 of lets say the TREND by Oscillator Area or Time attached here...you could easily change the position of the dots where it needs to be displayed by changing a simple line in the code to make your own sequence just how you want it.


Let's say for sake of the argument that this CSA study grows to 20 different types of indicators consisting of Trend, Momentum, Volatility etc...The end user will be able to choose what indicators they want either based on the criteria or multiple indicators from the same "family" to form their own CSA study.

Not only that but in theory one would be able to customize their own CSA study based on intraday or long term swing trade given the indicators of their liking.

AND by simply unchecking "show plot" from the user interface the end user could achieve a single variant of the study as you suggested in your picture.

Further more many coders who are available would be able to contribute to such a CSA study and not just a single coder...based on their own time availability and or preference to a specific type of indicator they would like to convert...or simply just contribution to the CSA study and the community who would find this valuable.

What do you think? Would that be the easiest way to go about this? If so and if you are interested I have a request for you below for LINE 6 of the CSA study.

Code:
# Trend by Oscillator Area or Time

# Nube v.01 1.8.18

# Nube v.02 1.9.18 - Added area method to original time only

# Used with MACD Diff here, but can be used with any oscilator.

# Replace Diff in indicator = Diff with your plot of choice

#Hint: Compares oscillator time above and below a level to determine trend



declare lower;



plot Diff = MACD().Diff;

     Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

     Diff.DefineColor("Negative and Up", Color.DARK_RED);

     Diff.DefineColor("Negative and Down", Color.RED);

     Diff.DefineColor("Positive and Up", Color.GREEN);

     Diff.DefineColor("Positive and Down", Color.DARK_GREEN);

     Diff.SetLineWeight(3);



Diff.AssignValueColor

(

if    Diff < 0

then  if   Diff > Diff[1]

      then Diff.color("Negative and Up")

      else Diff.color("Negative and Down")

else  if   Diff > Diff[1]

      then Diff.color("Positive and Up")

      else Diff.color("Positive and Down")

);



# Trend by Oscillator Area or Time

# Nube 1.9.18



input Style     = { Default Area, Time }; #hint Style: Meathod used for determining trend

input AboveThis = 0.0; #hint AboveThis: Value above which to count uptrend time

input BelowThis = 0.0; #hint BelowThis: Value below which to count downtrend time



def indicator = MACD().Diff; # <- Your plot here



def Up;

def Down;

switch (Style) {

case Area:

    Up   = indicator - AboveThis;

    Down = BelowThis - indicator;

case Time:

    Up   = indicator >= AboveThis;

    Down = indicator <  BelowThis;

};



def UpCount = if   indicator crosses above AboveThis

              then Up

              else UpCount[1] + Up;

def DnCount = if   indicator crosses below BelowThis

              then Down

              else DnCount[1] + Down;

               

def UpMeasure = if   indicator crosses below AboveThis    

                then UpCount

                else UpMeasure[1];

def DnMeasure = if   indicator crosses above BelowThis

                then DnCount

                else DnMeasure[1];



def TrendUp   = UpMeasure >= DnMeasure;

def TrendDown = DnMeasure >  UpMeasure;

               

addlabel(TrendUp, " Trend: Up ", Color.UpTick);

addlabel(TrendDown, " Trend: Down ", Color.DownTick);

  #f/ Trend by Oscillator Area or Time
If you use lines with a set width of 5, the display will be easier than the dots (POINTS) format to eye. You can also expose the color in a button and then it makes it easier to align the colors during your analysis or trading.
 
Hi @markos, let me see what I can scrub and share, some of it's proprietary trading, I will ask and see what I can make public, in the meantime is there some aspect or idea you want to experiment with? I will be in touch shortly.
No problem, I understand proprietary. If you could give me just one lower, it would speed us my process vs reinventing a wheel. Thanks!
 
No problem, I understand proprietary. If you could give me just one lower, it would speed us my process vs reinventing a wheel. Thanks!

you got it - see below - looking forward to your experimentation ;)

YfXyjcv.png


Ruby:
#NAME: HeikinAshiCandles - EXAMPLE LOWER PLOT
#VERSION: 2019.10.20
#TEMPLATE: 2019.10.20
#DESC: Plots Heikin Ashi Candles
#TYPE: 1
#CHANGELOG
# 2019.10.17 - Original Release
#
#
# Version 1.0 @diazlaz - for @markos
#

#<SCRIPT>
script HeikinAshiCandles {  #20191017 
    def h = high;
    def l = low;
    def o = open;
    def c = close;
  
    def HAopen;
    def HAhigh;
    def HAlow;
    def HAclose;
    HAopen = CompoundValue(1, (HAopen[1] + HAclose[1]) / 2, (o[1] + c[1]) / 2);
    HAhigh = Max(Max(h, HAopen), HAclose[1]);
    HAlow = Min(Min(l, HAopen), HAclose[1]);
    HAclose = (o + h + l + c) / 4;

    # STATE
    def sState1 = if HAclose > HAopen then 100 else -100;
  
    plot data = sState1;
} #end of HeikinAshiCandles
#</SCRIPT>

# STATE
def sState = HeikinAshiCandles();

# LOWER PLOT

plot pDB1 = 1.00;
pDB1.AssignValueColor(
if IsNaN(sState) then Color.DARK_GRAY else
if sState == 100 then COLOR.GREEN else
COLOR.RED);
pDB1.SetPaintingStrategy (PaintingStrategy.HORIZONTAL);
pDB1.SetLineWeight(5);
pDB1.HideTitle();
pDB1.HideBubble();

# END OF EXAMPLE PLOT
 
Last edited:
@diazlaz Is that an actual HeikinAshi candles script or just an example of one? I loaded it on my end and it does not resemble Heikin Ashi trend at all...I had to put it in the lower study to even display...Just wondering...
 
@pk1729 If you search for True Momentum Oscillator you will see several other versions...you will also find a MTF TMO version. I am looking for an indicator that is very responsive on higher timeframes of 30 min and up...TMO is lagging especially when not in a trending market on higher time frames. As far as RSI in Laguerre...no matter how much I read up on it...it still does not make much sense to me.
 
@diazlaz I see what you did with the HeikinAshi...you reversed the colors...for RED means up and GREEN means down...Any way to convert that code into a CSA style to be used in CSA study?
 
@diazlaz I see what you did with the HeikinAshi...you reversed the colors...for RED means up and GREEN means down...Any way to convert that code into a CSA style to be used in CSA study?
Thanks yes, typo fixed, I was quickly building the example and inverted the colors.

Yes it can if we all take it and break it into pieces I'm sure we can all tackle it and build Lego blocks and plug them in.
 
Last edited:
@diazlaz Yeah...I was able to change that in my code...I set it to the dots instead of the Lego blocks as that is my preference...Works great! Yeah let me know if you could convert that to the CSA format and add it as line 6...Not sure what you think of what I proposed in post 149...but that HA lower study would be a great addition IMO...
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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