NexusFi: Find Your Edge


Home Menu

 





Thinkscripts


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one RedK with 20 posts (15 thanks)
    2. looks_two pbenson68 with 15 posts (1 thanks)
    3. looks_3 RemoWilliams with 5 posts (1 thanks)
    4. looks_4 courier12 with 5 posts (0 thanks)
      Best Posters
    1. looks_one optntdr13 with 8.3 thanks per post
    2. looks_two Silvester17 with 8 thanks per post
    3. looks_3 Massive l with 3 thanks per post
    4. looks_4 RedK with 0.8 thanks per post
    1. trending_up 77,785 views
    2. thumb_up 73 thanks given
    3. group 52 followers
    1. forum 111 posts
    2. attach_file 32 attachments




 
 

Thinkscripts

 
 trendfriendpa 
philadelphia USA
 
Experience: Intermediate
Platform: TOS, Webull, Ninja 8
Broker: TD Ameritrade
Trading: options, ES/NQ futures, stocks
Posts: 79 since May 2011
Thanks Given: 54
Thanks Received: 53

Go into the code and change green to, let's say, orange and red to pink.


DailyEMA.AssignValueColor(if DailyEMA > DailyEMA[1] then color.orange else color.pink);


Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
How to apply profiles
Traders Hideout
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
33 thanks
Just another trading journal: PA, Wyckoff & Trends
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
21 thanks
 
 
RedK's Avatar
 RedK 
Dubai, UAE
 
Experience: Intermediate
Platform: TOS, TradeStation
Broker: OX, TradeStation
Trading: Stocks & Basic Options
Posts: 171 since May 2012
Thanks Given: 44
Thanks Received: 145


bldrmtnman View Post
is there a simple way to make that a selectable color for the two colors? I find there is too much red and green employed elsewhere in the chart, so it makes the EMA too similar to other indicators, making it difficult to differentiate between them.

@bldrmtnman, there you go .. this way you can set the Up/Down colors from the study settings

 
Code
input price = FundamentalType.CLOSE;
input aggregationPeriod = AggregationPeriod.DAY;
input length = 9;
input displace = 0;
input showOnlyLastPeriod = no;

plot DailyEMA;

if showOnlyLastPeriod and !IsNaN(close(period = aggregationPeriod)[-1]) {
DailyEMA = Double.NaN;
} else {
DailyEMA = Expaverage(fundamental(price, period = aggregationPeriod)[-displace], length);
}

DailyEMA.DefineColor ("Up", Color.Green);
DailyEMA.DefineColor ("Down", Color.Red);
DailyEMA.AssignValueColor(if DailyEMA > DailyEMA[1] then DailyEMA.Color("Up") else DailyEMA.Color("Down"));
DailyEMA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

hope this helps .. sorry if i can't help further.. i stopped using ToS,

RedK

Visit my NexusFi Trade Journal
Thanked by:
 
 pbenson68 
San Diego CA
 
Experience: Beginner
Platform: TOS
Trading: StocKs
Posts: 26 since May 2012
Thanks Given: 14
Thanks Received: 5


REDK,

What happened? Why no more TOS?

 
bldrmtnman
Oakhurst CA USA
 
Posts: 3 since Jul 2012
Thanks Given: 3
Thanks Received: 1


RedK View Post
@bldrmtnman, there you go .. this way you can set the Up/Down colors from the study settings

 
Code
input price = FundamentalType.CLOSE;
input aggregationPeriod = AggregationPeriod.DAY;
input length = 9;
input displace = 0;
input showOnlyLastPeriod = no;

plot DailyEMA;

if showOnlyLastPeriod and !IsNaN(close(period = aggregationPeriod)[-1]) {
DailyEMA = Double.NaN;
} else {
DailyEMA = Expaverage(fundamental(price, period = aggregationPeriod)[-displace], length);
}

DailyEMA.DefineColor ("Up", Color.Green);
DailyEMA.DefineColor ("Down", Color.Red);
DailyEMA.AssignValueColor(if DailyEMA > DailyEMA[1] then DailyEMA.Color("Up") else DailyEMA.Color("Down"));
DailyEMA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

hope this helps .. sorry if i can't help further.. i stopped using ToS,

RedK

RedK,

Thanks, sorry to hear you've moved away from the TOS platform. Care to tell why? I'm a neophyte and have settled on the platform for its versatility and its platform independence (ie, Mac, PC, iphone, ipad) trading options and every other instrument I think I might trade.

Would be interested to find out why it was lacking in your view.

thanks again for the assist.

Thanked by:
 
 Hguru 
New York City New York USA
 
Experience: Intermediate
Platform: Think or Swim, Infinity Futures
Broker: Thinkor Swim for Charts an Infinity Futures for Trading Dom
Trading: Oil
Posts: 54 since Jul 2012
Thanks Given: 449
Thanks Received: 48

RedK,
Yes.... is there a way to just have the color box with all the possible colors come up like in there regular TOS studies this way we could pick whatever colors we want that would solve the problem and make it easy for everyone.

Hguru

 
 
RedK's Avatar
 RedK 
Dubai, UAE
 
Experience: Intermediate
Platform: TOS, TradeStation
Broker: OX, TradeStation
Trading: Stocks & Basic Options
Posts: 171 since May 2012
Thanks Given: 44
Thanks Received: 145


pbenson68 View Post
REDK,

What happened? Why no more TOS?

@pbenson68 & @bldrmtnman,
should have said, the "platform departed with me" .. TDAm decided to stop business for certain international locations, it so happens i'm currently "job based" in one of them .. you can check my journal for more on the story.. in short i was asked to close my account and move out, which i did. then my access to ToS is now deactivated ..

i do respect the business rules of companies like TDAm, and appreciate that their exec's strives to bring the best value to shareholders, however i have the right to disagree with the business strategy to achieve that (and that would be irrelevant to TDAm anyways). i firmly beleive it doesn't make any business sense for a company to burn the money they previously invested to attract clients (my estimation, given the advertising cost, Dmails, sign-up bonus, support & backoffice staff man-hours, infra cost..etc) may be somewhere above $1K per client.. and also leave these clients with a bad taste. but then, if the board of a large corp like TDAm thinks this is the right way things should be, who am I to say otherwise.

on the platform, it's one of the best in my "limited" expereince, for viewing, analysis and customizing the way you trade around stocks and options, for those like me who want to avoid C++/C# and complex coding languages. futures, forex ..etc are a different story.

The brokerage service, order execution, data feed and client support quality levels (incl the backoffice staff when you need/have to deal with compliance, tax, transfer depts), in my view and the expereinces i had, leaves a big room for improvement and i would rate them as far below 21st century world. but that's my personal view and my short (1.5 year) expereince with them .. so totally subjective. a quick google search can provide details on these specifics from many ex-TDAm clients.

i still owe it to ToS (referring to the software) for teaching me so much.. clean & precise help files, expert presenters daily in the Swimlesson sessions.. etc .. From a brokerage service side of things, happier that i moved to another broker.. at one point in time, i felt my monet wasn't safe there and that makes you lose sleep (allow me to skip the reasons).. can't continue with a broker once it gets to that level.. i will continue to love ToS and if there's a chance, write/test my setups & scripts on it.

after moving out, i wanted to sum up my expereince and share for the possible benefit of others.. i hope i did this, in a non-emotional way, the goods and the bads, while skipping the useless details ..

so thank you for asking,
RedK

Visit my NexusFi Trade Journal
Thanked by:
 
 Cloudy 
desert CA
 
Experience: Intermediate
Platform: NT7, various
Broker: various, TDA
Trading: NQ,ES
Posts: 2,124 since Jul 2011
Thanks Given: 2,396
Thanks Received: 1,748

Hi Redk, thanks for the trade ribbon indicator. I'm working on translating it to NT. The idea of taking another average on the WMA looks very interesting and helpful when graphically shown. Could be a nice scalping indicator.

TOS is one of the best all-for-one platforms today I would agree. It was my first broker and platform. They recently opened up new commodity futures and other chat rooms yesterday where live audio can be heard from the pit floor.

Visit my NexusFi Trade Journal
Thanked by:
 
 
RedK's Avatar
 RedK 
Dubai, UAE
 
Experience: Intermediate
Platform: TOS, TradeStation
Broker: OX, TradeStation
Trading: Stocks & Basic Options
Posts: 171 since May 2012
Thanks Given: 44
Thanks Received: 145

@Cloudy, thanks for that .. i know some on the forum will appreciate your effort converting to NT ..

another intriguing concept i also looked at is to use a single WMA of some length and combine it with same WMA length but shifted by one period. You get signals from the crossing..

a quick note, in the Trader_Ribbon, the Mid line has a big role though, as it acts as a "reversal threshold" .. so can be used to indicate exit loss levels.

glad you find value in that concept,
RedK

Visit my NexusFi Trade Journal
Thanked by:
 
 Fourwedge 
Kansas City MO
 
Experience: Intermediate
Platform: Thinkorswim
Trading: Stocks
Posts: 34 since Oct 2012
Thanks Given: 262
Thanks Received: 18


optntdr13 View Post
I just wanted to let folks know that if you are looking for something specific, chances are I have it or wrote it and am more than happy to share with any and all. If you would like to have any T.....D......ARK stuff, I have coded almost every single one of them but won't share publically due to the maketstudies goons I will however send via PM or e-mail and am happy to do so.

TF trading using CCI method-it works
Although this is for TF futures, it works as well for all futures. My setup includes double BB at 20, 2 and 2.5; 20, 31, & 62 EMAs; Stochastics Slow of 6,5,3 and 8,3,3 on same plane as price; and most important, is the CCI (Commodity Channel Index) at 14, -45, 45 on a histogram display. I go long (Buy)on the first CCI bar that closes over 45 or Short (Sell) on the first CCI bar below -45(-45 to -200) You can use it to trade everything on any time frame. Once you have looked at enough charts on this setup, the trades and its accuracy will be clear. Trading just the TF on 12-20-10, there were 8 winning trades and no loses for a total of 132 ticks. There is one other aspect of my CCI trading I have not yet disclosed and you can pick it up after looking at the level of the CCI bars and there relationship to one another at reversals. I promise you, this is a winning system. I should add that this works on continuation trades and reversals. Trade with the trend on continuation trades and against the trend on reversals. Particularly on the reversal trades, move the stop to protect gains, as the market can always continue in its original direction and trend, but most often it does not until the CCI shows it is. I use the 20SMA, 20EMA, 31EMA to show the trends. The 20SMA is found in the BBs.
WK

Attached Thumbnails
Click image for larger version

Name:	image.jpg
Views:	386
Size:	587.8 KB
ID:	93300  
Thanked by:
 
 Fourwedge 
Kansas City MO
 
Experience: Intermediate
Platform: Thinkorswim
Trading: Stocks
Posts: 34 since Oct 2012
Thanks Given: 262
Thanks Received: 18


Comes from the trades hideout... index futures trading thread


I would also like some help getting the cci cloud to change the colors of the candles at +/- 45 to the color of the cloud itself. Any thing between +/- 45 is white. And there fore the candles are white as well?

I'm new to script and am looking for some help. Thanks in advance to everyone for patience with a noob.

Fourwedge

Attached Images
 

 



Last Updated on March 25, 2019


© 2024 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 - Privacy Policy - Downloads - Top
no new posts