Thinkscript to EasyLanguage - TradeStation | futures io social day trading
futures io futures trading


Thinkscript to EasyLanguage
Updated: Views / Replies:626 / 12
Created: by markmanu Attachments:0

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

Thinkscript to EasyLanguage

  #1 (permalink)
Kansas
 
 
Posts: 6 since Dec 2018
Thanks: 0 given, 1 received

Thinkscript to EasyLanguage

I'm a trainer and it's a bit complicated for me to convert this thinkscript code to easy language.
Can anyone please help me? Many thanks



declare upper;

input avglength = 14;
input MTaverageType = AverageType.WILDERS;
input ATRLength = 5;
input MTprice = hlc3;
input MTreversalMode = {default ATRpercent, price};
input MTreversalAmount = .5;

##DayATR Value Calculation
def highPrice = FundamentalType.high;
def closePrice = FundamentalType.close;
def lowPrice = FundamentalType.low;
def aggregationPeriod = AggregationPeriod.DAY;
rec AvgTrueRange = MovingAverage(AverageType.SIMPLE, TrueRange(Fundamental (highPrice, period = AggregationPeriod.Day), Fundamental (closePrice, period = AggregationPeriod.DAY), Fundamental (lowPrice, period = AggregationPeriod.DAY) ),ATRlength);

##############
##ATR percent conversion calculation
rec DayATRReversalValue = MTreversalAmount*(AvgTrueRange/close)*100;

def mode = if MTreversalMode == MTreversalMode.price then ZigZagTrendSign(price = MTprice, reversalAmount=MTreversalAmount) else ZigZagTrendPercent(price = MTprice, reversalAmount=DayATRReversalValue);
def MTinflection = if MTreversalMode == MTreversalMode.price then if !isNan(ZigZagSign(price = MTprice, reversalAmount=MTreversalAmount)) then 1 else 0 else if !isNan(ZigZagPercent(price = MTprice, reversalAmount=DayATRReversalValue)) then 1 else 0;
rec MTtrend = if MTinflection==1 and mode ==-1 then 1 else if MTinflection==1 and mode==1 then -1 else MTtrend[1];

rec MTupWaveVolume = if MTinflection==1 and MTtrend==1 and close>open then volume else if MTinflection==1 and MTtrend==1 and close <= open then 0 else if MTtrend==1 or (MTinflection==1 and MTtrend ==-1 and close>=open) then MTupWaveVolume[1]+volume else 0;
rec MTdownWaveVolume = if MTinflection==1 and MTtrend ==-1 and close<open then volume else if MTinflection==1 and MTtrend ==-1 and close>=open then 0 else if MTtrend==-1 or (MTinflection==1 and MTtrend==1 and close <= open) then MTdownWaveVolume[1]+volume else 0;



plot BuySignal = MTinflection[1] and MTdownwavevolume[2] > 0;
BuySignal.SetDefaultColor(Color.Cyan);
BuySignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
BuySignal.SetLineWeight(4);

plot SellSignal = MTinflection[1] and MTupwavevolume[2] > 0;
SellSignal.SetDefaultColor(Color.Magenta);
SellSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
SellSignal.SetLineWeight(4);

####################
##volume label add-on

##input MTVolumeAudible_Alert = yes;
def MTVolumeDeviation_Length = 60;
def MTVolumeDeviate = 2;
def MTvolumestdevlength = RelativeVolumeStDev(length = MTvolumeDeviation_Length);
def abovedev = MTvolumestdevlength >= MTvolumeDeviate;
def belowdev = MTvolumestdevlength <= MTvolumeDeviate;


def MTvolumeincrease = volume > volume[1];
def MTvolumedevincrease = MTvolumeincrease and abovedev;
def MTvolumedecrease = volume < volume[1];
def MTvolumedevdecrease = MTvolumedecrease and abovedev;

def O = open;
def H = high;
def C = close;
def L = low;
def V = volume;
def MTvolumeBuying = V * (C - L) / (H - L);
def MTvolumeSelling = V * (H - C) / (H - L);


input Show_Labels = yes;
AddLabel(Show_Labels, "Buy Vol = " + Round(MTvolumeBuying, 0), if MTvolumeBuying > MTvolumeSelling then color.green else color.red);
AddLabel(Show_Labels, "Sell Vol = " + Round(MTvolumeSelling, 0), if MTvolumeSelling > MTvolumeBuying then color.green else color.red);

Reply With Quote
The following user says Thank You to markmanu for this post:
 
  #2 (permalink)
Market Wizard
Portland, OR
 
Trading Experience: None
 
Massive l's Avatar
 
Posts: 1,796 since Mar 2011
Thanks: 1,315 given, 3,055 received

I don't use easy language but this looks like a really neat script. Do you currently use it in your trading plan?

Reply With Quote
 
  #3 (permalink)
Kansas
 
 
Posts: 6 since Dec 2018
Thanks: 0 given, 1 received



Massive l View Post
I don't use easy language but this looks like a really neat script. Do you currently use it in your trading plan?

Thanks for your reply.
This is studies from thinkorswim. And I want to convert these indicators for using on tradestation.
Do you have any ideas to convert it?

Reply With Quote
 
  #4 (permalink)
Kansas
 
 
Posts: 6 since Dec 2018
Thanks: 0 given, 1 received

thinkscript to easylanguage

Is there anyone who can help me to convert this code?
Please do not hesitate to give me any opinion you have, thanks

Reply With Quote
 
  #5 (permalink)
Phuket
 
 
Posts: 1 since Dec 2018
Thanks: 0 given, 0 received


markmanu View Post
I'm a trainer and it's a bit complicated for me to convert this thinkscript code to easy language.
Can anyone please help me? Many thanks



declare upper;

input avglength = 14;
input MTaverageType = AverageType.WILDERS;
input ATRLength = 5;
input MTprice = hlc3;
input MTreversalMode = {default ATRpercent, price};
input MTreversalAmount = .5;

##DayATR Value Calculation
def highPrice = FundamentalType.high;
def closePrice = FundamentalType.close;
def lowPrice = FundamentalType.low;
def aggregationPeriod = AggregationPeriod.DAY;
rec AvgTrueRange = MovingAverage(AverageType.SIMPLE, TrueRange(Fundamental (highPrice, period = AggregationPeriod.Day), Fundamental (closePrice, period = AggregationPeriod.DAY), Fundamental (lowPrice, period = AggregationPeriod.DAY) ),ATRlength);

##############
##ATR percent conversion calculation
rec DayATRReversalValue = MTreversalAmount*(AvgTrueRange/close)*100;

def mode = if MTreversalMode == MTreversalMode.price then ZigZagTrendSign(price = MTprice, reversalAmount=MTreversalAmount) else ZigZagTrendPercent(price = MTprice, reversalAmount=DayATRReversalValue);
def MTinflection = if MTreversalMode == MTreversalMode.price then if !isNan(ZigZagSign(price = MTprice, reversalAmount=MTreversalAmount)) then 1 else 0 else if !isNan(ZigZagPercent(price = MTprice, reversalAmount=DayATRReversalValue)) then 1 else 0;
rec MTtrend = if MTinflection==1 and mode ==-1 then 1 else if MTinflection==1 and mode==1 then -1 else MTtrend[1];

rec MTupWaveVolume = if MTinflection==1 and MTtrend==1 and close>open then volume else if MTinflection==1 and MTtrend==1 and close <= open then 0 else if MTtrend==1 or (MTinflection==1 and MTtrend ==-1 and close>=open) then MTupWaveVolume[1]+volume else 0;
rec MTdownWaveVolume = if MTinflection==1 and MTtrend ==-1 and close<open then volume else if MTinflection==1 and MTtrend ==-1 and close>=open then 0 else if MTtrend==-1 or (MTinflection==1 and MTtrend==1 and close <= open) then MTdownWaveVolume[1]+volume else 0;



plot BuySignal = MTinflection[1] and MTdownwavevolume[2] > 0;
BuySignal.SetDefaultColor(Color.Cyan);
BuySignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
BuySignal.SetLineWeight(4);

plot SellSignal = MTinflection[1] and MTupwavevolume[2] > 0;
SellSignal.SetDefaultColor(Color.Magenta);
SellSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
SellSignal.SetLineWeight(4);

####################
##volume label add-on

##input MTVolumeAudible_Alert = yes;
def MTVolumeDeviation_Length = 60;
def MTVolumeDeviate = 2;
def MTvolumestdevlength = RelativeVolumeStDev(length = MTvolumeDeviation_Length);
def abovedev = MTvolumestdevlength >= MTvolumeDeviate;
def belowdev = MTvolumestdevlength <= MTvolumeDeviate;


def MTvolumeincrease = volume > volume[1];
def MTvolumedevincrease = MTvolumeincrease and abovedev;
def MTvolumedecrease = volume < volume[1];
def MTvolumedevdecrease = MTvolumedecrease and abovedev;

def O = open;
def H = high;
def C = close;
def L = low;
def V = volume;
def MTvolumeBuying = V * (C - L) / (H - L);
def MTvolumeSelling = V * (H - C) / (H - L);


input Show_Labels = yes;
AddLabel(Show_Labels, "Buy Vol = " + Round(MTvolumeBuying, 0), if MTvolumeBuying > MTvolumeSelling then color.green else color.red);
AddLabel(Show_Labels, "Sell Vol = " + Round(MTvolumeSelling, 0), if MTvolumeSelling > MTvolumeBuying then color.green else color.red);

Hi, it is programmer from freelancer, please contact me, I converted the indicator

Reply With Quote
 
  #6 (permalink)
Kansas
 
 
Posts: 6 since Dec 2018
Thanks: 0 given, 1 received


fxprogrammer View Post
Hi, it is programmer from freelancer, please contact me, I converted the indicator

Hi fxprogrammer, thanks for your reply. Can you please show me how you converted the indicator?

Reply With Quote
 
  #7 (permalink)
Los Angeles + CA/USA
 
 
Posts: 1 since Jan 2019
Thanks: 1 given, 0 received

What does this strategy do? I code a little bit in EasyLanguage but haven't picked it apart yet.

It looks good on the 5-minute visual test but have you backtested it? TradingView is an easy way to backtest a rough draft.

I am discretionary but have been looking at systematic.

Reply With Quote
 
  #8 (permalink)
Seattle, WA/USA
 
Trading Experience: Intermediate
Platform: TOS, TS
Favorite Futures: Forex, crude
 
Posts: 49 since Sep 2016
Thanks: 7 given, 15 received

Do you mind posting a picture of what it's supposed to look like? If so I can try to figure it out over the next couple days

Follow me on Twitter Reply With Quote
 
  #9 (permalink)
Houston+TX/USA
 
Trading Experience: Intermediate
Platform: TradeStation, ThinkorSwim
Favorite Futures: ES, CL
 
mntman's Avatar
 
Posts: 7 since Jan 2019
Thanks: 1 given, 0 received


markmanu View Post
Hi fxprogrammer, thanks for your reply. Can you please show me how you converted the indicator?

markmanu -
did you have any success using fxprogrammer's version?



fxprogrammer View Post
Hi, it is programmer from freelancer, please contact me, I converted the indicator

fxprogrammer -
hi am also interested in having this converted to tradestation. can you post a screenshot please of your converted version onto a chart (not the code) please before i contact you?

Reply With Quote
 
  #10 (permalink)
Seattle, WA/USA
 
Trading Experience: Intermediate
Platform: TOS, TS
Favorite Futures: Forex, crude
 
Posts: 49 since Sep 2016
Thanks: 7 given, 15 received


At least on TOS, this indicator will give false signals.

Follow me on Twitter Reply With Quote

Reply



futures io > > > > Thinkscript to EasyLanguage

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now
 

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now
 

Show us your trading desks and win over $5,000 in prizes w/Jigsaw Trading

September
 

Webinar: The Best Entries and Exits in trading & in life w/Agustin Lebron

Elite only
 

Webinar: NinjaTrader 8 Newest Features Release Sneak Peek

Sep 26
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert ThinkScript to ThinkScript API t0757tlr ThinkOrSwim Programming 0 May 20th, 2018 11:09 AM
Converting EasyLanguage Code to Thinkscript Code (TOS) joeking ThinkOrSwim 2 November 21st, 2017 08:04 AM
ATR Trailing Stop: Convert Thinkscript to Easylanguage kamisyed MultiCharts 7 March 31st, 2017 05:13 PM
need help with a plot in EasyLanguage with knowledge of ThinkScript kidvic EasyLanguage Programming 22 May 24th, 2015 03:14 PM
ThinkScript studies c0ol2 ThinkOrSwim 5 April 8th, 2014 12:50 PM


All times are GMT -4. The time now is 11:00 PM. (this page content is cached, log in for real-time version)

Copyright © 2019 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