Thinkscript to EasyLanguage - futures io
futures io futures trading



Thinkscript to EasyLanguage


Discussion in TradeStation

Updated by StockT8er
      Top Posters
    1. looks_one StockT8er with 12 posts (0 thanks)
    2. looks_two mntman with 7 posts (4 thanks)
    3. looks_3 markmanu with 4 posts (1 thanks)
    4. looks_4 kjhosken with 3 posts (0 thanks)
    1. trending_up 3,120 views
    2. thumb_up 6 thanks given
    3. group 11 followers
    1. forum 32 replies
    2. attach_file 3 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

Thinkscript to EasyLanguage

(login for full post details)
  #11 (permalink)
Houston+TX/USA
 
Experience: Intermediate
Platform: TradeStation, ThinkorSwim
Trading: ES, CL
 
mntman's Avatar
 
Posts: 11 since Jan 2019
Thanks: 1 given, 4 received


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

yeah i just started watching it this week and have seen a few already, but i would like to test it anyways in tradestation using the yellow line as a stop to try minimize losses.


Reply With Quote

Can you help answer these questions
from other members on futures io?
Atm strategy help
NinjaTrader
GBP/ARS Pair
Traders Hideout
Where is the link to download GomiRecorder?
NinjaTrader
Need a near crosses scan help for TOS
ThinkOrSwim
Looking freelancer for MT4 Indicator
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Legal question and need desperate help
91 thanks
Building a high-performance data system
15 thanks
FIO Journal Challenge - June 2020 w/SharkIndicators
13 thanks
VWAP for stock index futures trading?
11 thanks
Risk reward question
11 thanks
 
(login for full post details)
  #12 (permalink)
Seattle, WA/USA
 
Experience: Intermediate
Platform: TOS, TS
Trading: Forex, crude
 
Posts: 80 since Sep 2016
Thanks: 7 given, 27 received

Not a bad idea. If you could attach the logic for that stop to something that gives valid or only confirmed signals it might look really good

Follow me on Twitter Reply With Quote
 
(login for full post details)
  #13 (permalink)
Houston+TX/USA
 
Experience: Intermediate
Platform: TradeStation, ThinkorSwim
Trading: ES, CL
 
mntman's Avatar
 
Posts: 11 since Jan 2019
Thanks: 1 given, 4 received



kjhosken View Post
Not a bad idea. If you could attach the logic for that stop to something that gives valid or only confirmed signals it might look really good

yep i agree. at the moment im thinking of using ATR as possible confirmation before entry.

Reply With Quote
 
(login for full post details)
  #14 (permalink)
ROY, Utah
 
Experience: Intermediate
Platform: TradeStation
 
Posts: 71 since Apr 2020
Thanks: 9 given, 6 received

How do I convert this in EasyLanguage

#CCI_CLOUDS
declare lower;
input cciLength2 = 5;
input cciAvgLength2 = 3;

input over_Sold = 20;
input over_Bought = 80;

plot OverBought = over_Bought;
OverBought.SetStyle(Curve.LONG_DASH);
plot OverSold = over_Sold;
OverSold.SetStyle(Curve.LONG_DASH);
#--------------------------------------------

plot CCI2 = .5 * CCI(length = cciLength2) + 50;
plot CCIAvg2 = Average(CCI2, cciAvgLength2);
plot CCI3 = ExpAverage(CCI2);
CCI2.SetStyle(Curve.SHORT_DASH);
CCI2.SetDefaultColor(GetColor(6));
CCIAvg2.SetDefaultColor(Color.RED);
CCI3.setDefaultColor(color.yellow);

AddCloud(CCI2, CCIAvg2, Color.GREEN, Color.RED);
AddCloud(CCI2, CCIAvg2, Color.GREEN, Color.RED);
AddCloud(CCIAvg2, CCI3, Color.GREEN, Color.RED);

Reply With Quote
 
(login for full post details)
  #15 (permalink)
Agoura Hills, CA USA
 
Experience: Advanced
Platform: Tradestation&Multicharts
Broker: TradeStation
Trading: Futures & Equities
 
numberjuani's Avatar
 
Posts: 127 since Apr 2019
Thanks: 9 given, 94 received

Tell us what the code is doing, and post 3 screenshots. unless somebody knows both languages its unlikely somebody will be able to help. but if you tell us what its doing and how it looks, somebody could help out


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);


Reply With Quote
 
(login for full post details)
  #16 (permalink)
Houston+TX/USA
 
Experience: Intermediate
Platform: TradeStation, ThinkorSwim
Trading: ES, CL
 
mntman's Avatar
 
Posts: 11 since Jan 2019
Thanks: 1 given, 4 received


StockT8er View Post
How do I convert this in EasyLanguage

#CCI_CLOUDS

see below... sorry dont know how to do the clouds portion, only the indicator.

 
Code
inputs:
	cciLength2(5),
	cciAvgLength2(3),
	over_sold(80),
	over_bought(20);
	
vars:
	cci2(0),
	cciAvg2(0),
	cci3(0);

cci2 = 0.5 * CCI(cciLength2) + 50;
cciAvg2 = Average(cci2, cciAvgLength2);
cci3 = Xaverage(cci2, 12);

plot1(cci2, "cci2");
plot2(cciAvg2, "cciAvg2");
plot3(cci3, "cci3");
plot4(over_bought, "overbought");
plot5(over_sold, "oversold");

Reply With Quote
The following user says Thank You to mntman for this post:
 
(login for full post details)
  #17 (permalink)
ROY, Utah
 
Experience: Intermediate
Platform: TradeStation
 
Posts: 71 since Apr 2020
Thanks: 9 given, 6 received

Thanks don't need cloud

The Swing Trade script works great, just don't get the bottom bar portion, not in your script

Reply With Quote
 
(login for full post details)
  #18 (permalink)
ROY, Utah
 
Experience: Intermediate
Platform: TradeStation
 
Posts: 71 since Apr 2020
Thanks: 9 given, 6 received

This would be Fantastic if you could get it to work during available trading hours
I include a script to add trading hrs, just not sure how to incorporate it into your script

input usetimefilter = yes;

#positioning
input rthopen = 0930;
input rthclose = 1600;
def RTH = if usetimefilter == yes then if SecondsFromTime(rthopen) >= 0 and
SecondstillTime(rthclose) >= 0
then 1
else 0 else 1;

Also would be nice if when it's getting close to triggering was to send an Alert

THIS IS A MONEY MAKER

Reply With Quote
 
(login for full post details)
  #19 (permalink)
ROY, Utah
 
Experience: Intermediate
Platform: TradeStation
 
Posts: 71 since Apr 2020
Thanks: 9 given, 6 received

In running your Study, it seams to have a sight flaw. The Buy Point and the Sell Point keep changing
In Order to use this as a strategy you need to have it readjust after an accrual BUY or SELL

Reply With Quote
 
(login for full post details)
  #20 (permalink)
ROY, Utah
 
Experience: Intermediate
Platform: TradeStation
 
Posts: 71 since Apr 2020
Thanks: 9 given, 6 received


Do you know how to fix this

def colorB = if isLastBar = (Color.GREEN) and color.CURRENT = (Color.DARK_GREEN) then 1 else 0;
def colorS = if isLastBar = (Color.RED) and color.CURRENT = (Color.DARK_RED) then 1 else 0;

Reply With Quote


futures io Trading Community Platforms and Indicators TradeStation > Thinkscript to EasyLanguage


June 22, 2020


Upcoming Webinars and Events
 

Getting Comfortable with Price Action Patterns w/Earn2Trade

Aug 4
 

Live Video Panel: Ask Me Anything w/Ironbeam Brokerage

Aug 6
     



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