NexusFi: Find Your Edge


Home Menu

 





Match zerolines and scaling of two studies in same lower panel


Discussion in ThinkOrSwim

Updated
    1. trending_up 3,227 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 3 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
 
Lancer's Avatar
 Lancer 
Seattle, USA
 
Experience: Intermediate
Platform: NinjaTrader / ThinkOrSwim
Broker: NinjaTrader / TDAmeritrade
Trading: Futures, Equities
Posts: 44 since Jul 2016
Thanks Given: 16
Thanks Received: 55

Using two standard TOS studies, MACDTwoLines and MACDHistogram in the same lower panel, where are the settings controls to match the zerolines and right axis scaling? As it is now, both studies have separate zero lines, and the right axis scale changed to percentage, and there is no way to change it that I can see.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
CME Raises Energy Futures Margins After Iran-War Volatil …
Commodities
May 26 Deadline Dies at 7.5% as US Strikes Iran During C …
Prediction Markets & Event Contracts
Hormuz Surges From 14% to 26.5% Intraday as Irans Answer …
Prediction Markets & Event Contracts
Second Night of US Strikes Crushes Iran June 15 to 3.6% …
Prediction Markets & Event Contracts
Trump Truth Social Fires Hormuz From 10% to 59% -- Arsen …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
13 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #2 (permalink)
 
Lancer's Avatar
 Lancer 
Seattle, USA
 
Experience: Intermediate
Platform: NinjaTrader / ThinkOrSwim
Broker: NinjaTrader / TDAmeritrade
Trading: Futures, Equities
Posts: 44 since Jul 2016
Thanks Given: 16
Thanks Received: 55

No answer, so I'll assume there are no controls to set multiple studies in a lower panel to the same right scale. So, does anyone have a Thinkscript file that plots both the MACDTwoLines and the MACDHistogram? In a single script, the zerolines and the vertical scale would be the same.

There are a few TOS scripts here on NexusFi, but not that one exactly. Does anyone know if TDAmeritrade has an archive of Thinkscript files posted by users, available for download?


Started this thread Reply With Quote
  #3 (permalink)
 growex 
Trubchevsk
 
Experience: Beginner
Platform: tos
Trading: stocks
Posts: 61 since May 2011
Thanks Given: 40
Thanks Received: 79



Lancer View Post
No answer, so I'll assume there are no controls to set multiple studies in a lower panel to the same right scale. So, does anyone have a Thinkscript file that plots both the MACDTwoLines and the MACDHistogram? In a single script, the zerolines and the vertical scale would be the same.

There are a few TOS scripts here on NexusFi, but not that one exactly. Does anyone know if TDAmeritrade has an archive of Thinkscript files posted by users, available for download?




declare lower;

input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
input averageType = AverageType.EXPONENTIAL;
plot Value = MACD(fastLength, slowLength, MACDLength, averageType).Value;
plot Avg = MACD(fastLength, slowLength, MACDLength, averageType).Avg;
plot Diff = MACD(fastLength, slowLength, MACDLength, averageType).Diff;
plot ZeroLine = 0;
Value.SetDefaultColor(GetColor(1));
Avg.SetDefaultColor(GetColor(8));
ZeroLine.SetDefaultColor(GetColor(0));
Diff.SetDefaultColor(GetColor(5));
Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Diff.SetLineWeight(3);
Diff.DefineColor("Positive and Up", Color.GREEN);
Diff.DefineColor("Positive and Down", Color.DARK_GREEN);
Diff.DefineColor("Negative and Down", Color.RED);
Diff.DefineColor("Negative and Up", Color.DARK_RED);
Diff.AssignValueColor(if Diff >= 0 then if Diff > Diff[1] then Diff.color("Positive and Up") else Diff.color("Positive and Down") else if Diff < Diff[1] then Diff.color("Negative and Down") else Diff.color("Negative and Up"));


Follow me on X Reply With Quote
Thanked by:
  #4 (permalink)
 
Lancer's Avatar
 Lancer 
Seattle, USA
 
Experience: Intermediate
Platform: NinjaTrader / ThinkOrSwim
Broker: NinjaTrader / TDAmeritrade
Trading: Futures, Equities
Posts: 44 since Jul 2016
Thanks Given: 16
Thanks Received: 55

Thanks to growex. Here is the script file.


Attached Files
Elite Membership required to download: MACDandHistogramSTUDY.ts
Started this thread Reply With Quote




Last Updated on April 7, 2018


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts