NexusFi: Find Your Edge


Home Menu

 





Convert Easy Language code into Thinkscript


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one RedK with 8 posts (3 thanks)
    2. looks_two sboarder13 with 6 posts (1 thanks)
    3. looks_3 mightyatom with 3 posts (0 thanks)
    4. looks_4 esslash with 1 posts (1 thanks)
      Best Posters
    1. looks_one esslash with 1 thanks per post
    2. looks_two GeorgeCgI with 1 thanks per post
    3. looks_3 RedK with 0.4 thanks per post
    4. looks_4 sboarder13 with 0.2 thanks per post
    1. trending_up 27,548 views
    2. thumb_up 6 thanks given
    3. group 9 followers
    1. forum 20 posts
    2. attach_file 6 attachments




 
Search this Thread

Convert Easy Language code into Thinkscript

  #11 (permalink)
 
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

@Sboarder, there's no direct function in ToS script to dynamically calc the upper/lower borders of the plot - specially when you zoom in & out of a chart. at least not that i'm aware of.
so what we did is take the highest value and the lowest value of price across the whole chart, and worked from that to draw the levels for the dots.

if it's up to me, i wouldn't use that technique at all in my study.. i may use a 10% space above either the highest price, or below the lowest price, and plot my study there if it "must be on the price chart", but not try to take both sides. but that will even be completely messed up on certain time aggregations, so would prefer to plot my study in a separate lower study windows to such a scenario.

these are the lines in the code that decide where to plot what.. pls feel free to change them to what you like.
(did i reverse the placement of long & short .. ? sorry if i did... it's all in these 6 lines below)

def LongL1 = LongLevel - DispDiff * 0.09;
def LongL2 = LongLevel - DispDiff * 0.05;
def LongL3 = LongLevel - DispDiff * 0.01;

def ShortL1 = ShortLevel + DispDiff * 0.02;
def ShortL2 = ShortLevel + DispDiff * 0.04;
def ShortL3 = ShortLevel + DispDiff * 0.06;

if you want this as a lower study, just choose this is study settings - uncheck the box "On Upper subgraph" .. and use constants for LongLevel & ShortLevel like 50 & 0,

hope this helps,
thx, RedK

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
GFIs1 1 DAX trade per day journal
16 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
My NQ Trading Journal
12 thanks
  #12 (permalink)
sboarder13
Washington DC United States
 
Posts: 6 since Aug 2012
Thanks Given: 0
Thanks Received: 1

Updated it some here is what I came up with.

Attached Files
Elite Membership required to download: WaveDotsSTUDY.ts
Reply With Quote
Thanked by:
  #13 (permalink)
mightyatom
United Kingdom
 
Posts: 3 since Feb 2013
Thanks Given: 0
Thanks Received: 0


Hey,

I have a tradestation indicator that I would like converting into thinkscript for tos!

Let me know if you can do it

Matt

Reply With Quote
  #14 (permalink)
 
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

Matt, can give it a shot if you can give some details.. there are some areas i don't do and it's been a while, but let's see ..
RedK

Visit my NexusFi Trade Journal Reply With Quote
  #15 (permalink)
mightyatom
United Kingdom
 
Posts: 3 since Feb 2013
Thanks Given: 0
Thanks Received: 0

the

Reply With Quote
  #16 (permalink)
 
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

Matt, i understand this code scans & displays some fundamentals on stocks. i ToS, you don't do this thru studies (plots on charts), but rather thru the Scan or MarketWatch screens .. there are some good tutorial around on how to do it..
sorry if that's not what you expected,

cheers,
K

Visit my NexusFi Trade Journal Reply With Quote
  #17 (permalink)
mightyatom
United Kingdom
 
Posts: 3 since Feb 2013
Thanks Given: 0
Thanks Received: 0

Hey,

Are you able to create a implied volatility scan for TOS?

Reply With Quote
  #18 (permalink)
taqalla
new york
 
Posts: 1 since Mar 2014
Thanks Given: 0
Thanks Received: 0

just looking to convert tradestation codes and ninjatrader code to thinkorswim any site or initial coding needed? thank you


Reply With Quote
  #19 (permalink)
 
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


taqalla View Post
just looking to convert tradestation codes and ninjatrader code to thinkorswim any site or initial coding needed? thank you


@taqalla, I may be able to help you with TradeStation to ToS conversion .. but not NT (sorry not my domain)

feel free to PM me a sample TS study - preferably with some description of what it does. I'll see what i can do .. I'm at least sure it will look nicer once it's plotted in ToS

thx
K

Visit my NexusFi Trade Journal Reply With Quote
  #20 (permalink)
esslash
Deerfield Beach, Fl.
 
Posts: 1 since Aug 2012
Thanks Given: 0
Thanks Received: 1


I found this code for D -Wave on the web for Amibroker and I'd really like to have it in Think or Swim. Thanks...
P.S. It appears it is designed to only go up and I need it to go down as well...
********************************************




Basically, time and sequence constraints are added; something like this TD1 (that is EW1 D-wave) is completed when pre-TD1 conditions are filled; so here we go based on Perl interpretation on the link above:

PreTD1= C==LLV(C,21);
TD1= follows PreTD1 and C== HHV(C,13) ;
TD2= follows TD1 and C==LLV(C,8);
TD3= follows ...and.. C==HHV(C,21);
TD4= follows ...and..C==LLV(C,13);
TD5= follows ...and..C==HHV(C,34);
TDA= follows ...and..C==LLV(C,13);
TDB= follows ...and..C==HHV(C,8);
TDC= follows ...and..C==LLV(C,21);

*****************************************************

Lash

Reply With Quote
Thanked by:




Last Updated on November 22, 2016


© 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