Thinkscripts - ThinkOrSwim Programming | futures io social day trading
futures io futures trading


Thinkscripts
Updated: Views / Replies:39,289 / 105
Created: by optntdr13 Attachments:31

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 31  
 
Thread Tools Search this Thread
 

Thinkscripts

  #51 (permalink)
Knowledge Seeker
Dubai, UAE
 
Futures Experience: Intermediate
Platform: TOS, TradeStation
Broker/Data: OX, TradeStation
Favorite Futures: Stocks & Basic Options
 
RedK's Avatar
 
Posts: 171 since May 2012
Thanks: 44 given, 138 received

@bpenson68, what's a tick counter can you tell me more? haven't come across anything like this in ToS...

Reply With Quote
 
  #52 (permalink)
Elite Member
San Diego CA
 
Futures Experience: Beginner
Platform: TOS
Favorite Futures: StocKs
 
Posts: 26 since May 2012
Thanks: 14 given, 5 received


RedK View Post
@bpenson68, what's a tick counter can you tell me more? haven't come across anything like this in ToS...

In woodies Cci system there is 3 minute timer used to make trades. He uses 3 min bars. If the condition is met the trade is made with 20 secs left on the timer

When using tick aggregation, let's say 133 ticks per bar, a tick counter would let you know how many ticks were left before the bar closes, it could be used to pull the trigger if the condition looked for is met, for example early entry on cci breaking 45 after 100
Ticks

Here is link to someone who was searching for it on trade station
Tick Counter for Tradestation - TL - 3480

Reply With Quote
 
  #53 (permalink)
Trading Apprentice
Oakhurst CA USA
 
Futures Experience: Beginner
Platform: Think or Swim
Favorite Futures: SPY
 
Posts: 3 since Jul 2012
Thanks: 3 given, 1 received

Colorized SMA


I was hoping you might be able to guide me or tell me what to add to the code below to have the SMA green on incline and red on flat or decline, with the option of being able to turn colorizing off and have it be a chosen color. In other words my 100, 200 SMA i want to be a chosen color while the 50 SMA I want to change colors depending on direction. Below is the default thinkscript for the SMA

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

plot DailySMA;

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

DailySMA.SetDefaultColor(GetColor(1));
DailySMA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

Reply With Quote
 
  #54 (permalink)
Knowledge Seeker
Dubai, UAE
 
Futures Experience: Intermediate
Platform: TOS, TradeStation
Broker/Data: OX, TradeStation
Favorite Futures: Stocks & Basic Options
 
RedK's Avatar
 
Posts: 171 since May 2012
Thanks: 44 given, 138 received


bldrmtnman View Post
I was hoping you might be able to guide me or tell me what to add to the code below to have the SMA green on incline and red on flat or decline, with the option of being able to turn colorizing off and have it be a chosen color. In other words my 100, 200 SMA i want to be a chosen color while the 50 SMA I want to change colors depending on direction. Below is the default thinkscript for the SMA

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

plot DailySMA;

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

DailySMA.SetDefaultColor(GetColor(1));
DailySMA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

Hi,
after you copy the above code to another study, and give it a name, say, myColoredDailySMA, replace the line in red with below line..should do the trick.. then add as many studies as you need SMA's to the chart.. use the built-in SMA for the non-colored SMA's (choose the color from study settings) and your new custom study for the colored ones..

hope this helps,
cheers,
RedK

 
Code
DailySMA.AssignValueColor(if DailySMA > DailySMA[1] then color.green else color.red);


Last edited by RedK; October 3rd, 2012 at 04:55 AM.
Reply With Quote
The following 2 users say Thank You to RedK for this post:
 
  #55 (permalink)
Knowledge Seeker
Dubai, UAE
 
Futures Experience: Intermediate
Platform: TOS, TradeStation
Broker/Data: OX, TradeStation
Favorite Futures: Stocks & Basic Options
 
RedK's Avatar
 
Posts: 171 since May 2012
Thanks: 44 given, 138 received


pbenson68 View Post
In woodies Cci system there is 3 minute timer used to make trades. He uses 3 min bars. If the condition is met the trade is made with 20 secs left on the timer

When using tick aggregation, let's say 133 ticks per bar, a tick counter would let you know how many ticks were left before the bar closes, it could be used to pull the trigger if the condition looked for is met, for example early entry on cci breaking 45 after 100
Ticks

Here is link to someone who was searching for it on trade station
Tick Counter for Tradestation - TL - 3480

sorry if i can't help with that one.. tick charts = unchartered area for me..

Reply With Quote
 
  #56 (permalink)
Elite Member
New York City New York USA
 
Futures Experience: Intermediate
Platform: Think or Swim, Infinity Futures
Broker/Data: Thinkor Swim for Charts an Infinity Futures for Trading Dom
Favorite Futures: Oil
 
Posts: 51 since Jul 2012
Thanks: 448 given, 45 received

How do we change that same study request for an a EMA

RedK,

How can we make that colored SMA into an EMA the same way bldrmtnman Posted it.

Thanks

Hguru

Reply With Quote
 
  #57 (permalink)
Knowledge Seeker
Dubai, UAE
 
Futures Experience: Intermediate
Platform: TOS, TradeStation
Broker/Data: OX, TradeStation
Favorite Futures: Stocks & Basic Options
 
RedK's Avatar
 
Posts: 171 since May 2012
Thanks: 44 given, 138 received


Hguru View Post
RedK,

How can we make that colored SMA into an EMA the same way bldrmtnman Posted it.
Thanks
Hguru

@Hguru,

all you need is a quick change of the average formula line into "expaverage" instead of the simple "average". i also changed the variable name to go with that..

sorry if i can't test this as you know but it should work.. paste the below code into a new study, and call it anything, like MyDailyEMA .. hope this works

 
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.AssignValueColor(if DailyEMA > DailyEMA[1] then color.green else color.red);
DailyEMA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

Reply With Quote
The following 2 users say Thank You to RedK for this post:
 
  #58 (permalink)
Elite Member
New York City New York USA
 
Futures Experience: Intermediate
Platform: Think or Swim, Infinity Futures
Broker/Data: Thinkor Swim for Charts an Infinity Futures for Trading Dom
Favorite Futures: Oil
 
Posts: 51 since Jul 2012
Thanks: 448 given, 45 received

TOS EMA study

RedK,

I will check it out. I appreciate the effort. Got to keep those TOS programing juices flowing

Thanks

Hguru

Reply With Quote
 
  #59 (permalink)
Elite Member
San Diego CA
 
Futures Experience: Beginner
Platform: TOS
Favorite Futures: StocKs
 
Posts: 26 since May 2012
Thanks: 14 given, 5 received


RedK View Post
sorry if i can't help with that one.. tick charts = unchartered area for me..

No problem, there are bigger fish to fry I learned from this site that TOS has a lag, all my work is garbage if this can't be solved

Reply With Quote
 
  #60 (permalink)
Trading Apprentice
Oakhurst CA USA
 
Futures Experience: Beginner
Platform: Think or Swim
Favorite Futures: SPY
 
Posts: 3 since Jul 2012
Thanks: 3 given, 1 received



RedK View Post
@Hguru,

all you need is a quick change of the average formula line into "expaverage" instead of the simple "average". i also changed the variable name to go with that..

sorry if i can't test this as you know but it should work.. paste the below code into a new study, and call it anything, like MyDailyEMA .. hope this works

 
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.AssignValueColor(if DailyEMA > DailyEMA[1] then color.green else color.red);
DailyEMA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

RedK

Thanks for the effort to put up the code.
I wanted to change up the color, though I could go in and change the code for the color to a default, such as:

DailyEMA.AssignValueColor(if DailyEMA > DailyEMA[1] then dark_green else color. dark_red);

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.

Reply With Quote

Reply



futures io > > > > > Thinkscripts

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     


All times are GMT -4. The time now is 04:54 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-13 in 0.13 seconds with 19 queries on phoenix via your IP 54.90.92.204