TradeStation EL -> thinkScript Conversion - ThinkOrSwim Programming | futures io social day trading
futures io futures trading


TradeStation EL -> thinkScript Conversion
Updated: Views / Replies:8,565 / 14
Created: by StockJock Attachments:1

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
 1  
 
Thread Tools Search this Thread
 

TradeStation EL -> thinkScript Conversion

  #1 (permalink)
Trading for Profit
Chicago + Illinois/USA
 
Futures Experience: Beginner
Platform: ThinkOrSwim
Favorite Futures: Stock
 
StockJock's Avatar
 
Posts: 256 since Aug 2010
Thanks: 15 given, 148 received

TradeStation EL -> thinkScript Conversion

I'm trying to get a zigzag indicator for TOS and it seems like I'll have to go through a translation from another platform language. I found a simple Easy Language script for TradeStation that possibly someone can help me with.

TradeStation ZigZag

 
Code
Inputs: STR(1);
vars: Switch(0); 
if Switch = 0 then begin
if high[1] > high[2] and high[1] > high then begin
plot1[1](high[1], "ZigUp");
Switch = 1;
end;
end;
if Switch = 1 then begin
if low[1] < low[2] and low[1] < low then begin
plot1[1](low[1], "ZigUp");
Switch = 0;
end;
end;
Here's my first attempt at translation, but how do you draw lines between highs and lows and how can I change the period length between highs and lows?
 
Code
declare upper;
def ConditionUP = high[1] > high[2] and high[1] > high;
def ConditionDown = low[1] < low[2] and low[1] < low;
AddChartBubble(ConditionUP,High[1], "ZZUp", Color.Green,Yes);
AddChartBubble(def ConditionDown,Low[1], "ZZDn", Color.Red,Yes);

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Atlanta, Georgia
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: DDT
Favorite Futures: ZN, ZB
 
cbritton's Avatar
 
Posts: 224 since Mar 2010
Thanks: 152 given, 237 received


Try this one:

 
Code
                            
declare upper;
def ConditionUP high[0] > high[1] and high[0] > high[-1];
def ConditionDown low[0] < low[1] and low[0] < low[-1];
AddChartBubble(ConditionUP,High[0], "ZZUp"Color.Green,Yes);
AddChartBubble(ConditionDown,Low[0], "ZZDn"Color.Red,no); 
Regards,
-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Reply With Quote
The following user says Thank You to cbritton for this post:
 
  #4 (permalink)
Trading for Profit
Chicago + Illinois/USA
 
Futures Experience: Beginner
Platform: ThinkOrSwim
Favorite Futures: Stock
 
StockJock's Avatar
 
Posts: 256 since Aug 2010
Thanks: 15 given, 148 received

Thanks. I'm getting closer to a zigzag.

Reply With Quote
 
  #5 (permalink)
Elite Member
Glyndon, Maryland, USA
 
Futures Experience: Advanced
Platform: TOS
Favorite Futures: options
 
Posts: 24 since Sep 2010
Thanks: 6 given, 47 received

declare upper;
input n = 2.0;
input p = open;
input offset = 1;
input average = yes;

plot zig = reference zigZagpercent("reversal amount" = n, "price" = p);
zig.EnableApproximation();
def sign = reference zigZagtrendpercent("reversal amount" = n, "price" = p);
def new = if !IsNaN(zig) then 1 else 0;
rec count = if new then 1 else count[1] + 1;
rec vol = if new then volume else vol[1] + volume;
def avgvol = if average then roundDown(vol[1] / count[1], 0) else vol[1];
def up = if new and sign > 0 then 1 else 0;
def down = if new and sign < 0 then 1 else 0;
AddChartBubble(up, high + offset, concat(avgvol, ""), color.blue, yes);
AddChartBubble(down, low - offset, concat(avgvol, ""), color.black, no);

Reply With Quote
The following 3 users say Thank You to optntdr13 for this post:
 
  #6 (permalink)
Trading for Profit
Chicago + Illinois/USA
 
Futures Experience: Beginner
Platform: ThinkOrSwim
Favorite Futures: Stock
 
StockJock's Avatar
 
Posts: 256 since Aug 2010
Thanks: 15 given, 148 received

optntdr13,

Thanks for your code. I eventually want to use this to develop two other codes, if I can get TOS to do them. They are to adapt zigzag for Fibonacci levels and adapt zigzag for parallel offset lines to show trend channels with overbought and oversold zones (a little like Andrew's Pitchfork ). I'm thinking of using the standard deviation to plot the offset lines. Could you tell me which part of the code determines the end points of each of the zigzag lines and how I can capture their values for my new codes?

I've tried to make the trend channel code, but its not working. Any ideas?

 
Code
declare upper;
input n = 2.0;
input p = open;
input offset = 1;
input average = yes;
input Deviation1 = 2.0;
input Deviation2 = 1.0;
plot zigzag = reference zigZagpercent("reversal amount" = n, "price" = p);
zigzag.EnableApproximation();
def sign = reference zigZagtrendpercent("reversal amount" = n, "price" = p);
def new = if !IsNaN(zigzag) then 1 else 0;
rec count = if new then 1 else count[1] + 1;
rec vol = if new then volume else vol[1] + volume;
def avgvol = if average then roundDown(vol[1] / count[1], 0) else vol[1];
def up = if new and sign > 0 then 1 else 0;
def down = if new and sign < 0 then 1 else 0;
#  AddChartBubble(up, high + offset, concat(avgvol, ""), color.blue, yes);
#  AddChartBubble(down, low - offset, concat(avgvol, ""), color.black, no);
def sDev = stdev(zigzag);
plot UpperBand1 = zigzag + Deviation1 * sDev;
plot UpperBand2 = zigzag + Deviation2 * sDev;
plot LowerBand2 = zigzag - Deviation2 * sDev;
plot LowerBand1 = zigzag - Deviation1 * sDev;


Last edited by StockJock; March 9th, 2011 at 04:41 PM.
Reply With Quote
 
  #7 (permalink)
Elite Member
Glyndon, Maryland, USA
 
Futures Experience: Advanced
Platform: TOS
Favorite Futures: options
 
Posts: 24 since Sep 2010
Thanks: 6 given, 47 received

At first glance, it looks likme it should work but I will be more than happy to play with it after the trading day to see what I can come up with. I would like to attempt to use it myself for TDDwave...since I am told it can't be done I think I will try.

Reply With Quote
The following user says Thank You to optntdr13 for this post:
 
  #8 (permalink)
Elite Member
Glyndon, Maryland, USA
 
Futures Experience: Advanced
Platform: TOS
Favorite Futures: options
 
Posts: 24 since Sep 2010
Thanks: 6 given, 47 received

Do me a favor, draw on this image I am posting below what it is you want to do in the above...

2011-03-11_1414 - optntdr13's library

Reply With Quote
The following user says Thank You to optntdr13 for this post:
 
  #9 (permalink)
Trading for Profit
Chicago + Illinois/USA
 
Futures Experience: Beginner
Platform: ThinkOrSwim
Favorite Futures: Stock
 
StockJock's Avatar
 
Posts: 256 since Aug 2010
Thanks: 15 given, 148 received

Interesting image you posted. What are all those indicators on it?

Reply With Quote
 
  #10 (permalink)
Elite Member
Glyndon, Maryland, USA
 
Futures Experience: Advanced
Platform: TOS
Favorite Futures: options
 
Posts: 24 since Sep 2010
Thanks: 6 given, 47 received


2 seperate versions / time-frame implementations of Time-Segmented Volume turned into a copy of the 3C indicator used by trade-guild.net or at least my versions. They encompass the two crazy lines are I use them as leading indicators of institutional money flows. Then, I have TD Propulsion and TD Setup for trend as well as TD Price Flips. Yes, I do use them all and sometimes even more and quite well too

Reply With Quote
The following user says Thank You to optntdr13 for this post:

Reply



futures io > > > > > TradeStation EL -> thinkScript Conversion

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
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
BLUELINE DELIGHT >>>Intraday Trading Strategy Guide<<< Gabriyele The Elite Circle 407 May 30th, 2013 08:29 AM
IB => TradeStation 8 (Data Feed) willygan Reviews of Brokers and Data Feeds 2 March 27th, 2011 02:58 AM
Euronis v4200 --> Ninja, TradeStation or MultiCharts? bluemele Elite Automated Trading 5 October 24th, 2010 05:01 PM
TIP : Search for free NinjaTrader Indicator on BMT ? >> How to use our searchtools ! max-td Beginners and Introductions 2 July 19th, 2010 07:16 AM


All times are GMT -4. The time now is 08:48 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-14 in 0.13 seconds with 20 queries on phoenix via your IP 54.221.73.186