NexusFi: Find Your Edge


Home Menu

 





Convert from Thinkscript to Easylanguage


Discussion in EasyLanguage Programming

Updated
    1. trending_up 5,414 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 apmodeler 
Boise, Idaho
 
Experience: Intermediate
Platform: TOS
Trading: Stocks
Posts: 37 since Aug 2013
Thanks Given: 56
Thanks Received: 9

Hi All,
Need some help converting this ThinkScript line to Easylanguage.

def Bollinger_Keltner = reference BollingerBands("Num" = 2, "length" = 20 )."upperband" - KeltnerChannels("Fac" = 1, "length" = 20)."Upper_Band";

Any help is greatly appreciated!
Thank you!!
AP


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
Without Pulisic, USA 61.5% Live vs. Australia -- France …
Prediction Markets & Event Contracts
US Prop Firms Race Inside the CFTC Perimeter -- Tradeify …
Funded Trading Evaluation Firms
Iran War Prediction Markets: Ceasefire 16%, Ground Invas …
Prediction Markets & Event Contracts
Q1 2026 Shatters All Derivatives Volume Records -- CME H …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
196 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
BERN ALGOS algo trading journal
8 thanks
  #2 (permalink)
Kolnidrei
Lyon/France
 
Posts: 23 since Aug 2012
Thanks Given: 1
Thanks Received: 14

hi,
in the following way you can also easily
construct all the other calculations you might need...

 
Code
Inputs:
BBPeriod(20),
KPeriod(20),
Mult(2),
FactorATR(1.0);
Vars:
BB_Line(0),StDev(0),BBUpperBand(0),BBLowerBand(0),
K_Line(0),Deviation,KUpperBand(0),KLowerBand(0),X;

BB_Line = Average(Close, BBPeriod);
StDev = StandardDev( Close, BBPeriod, 1 );
BBUpperBand = BB_Line + Mult * StDev ;
BBLowerBand = BB_Line + Mult * StDev * -1 ;

K_Line = Average(Close, KPeriod);
Deviation = FactorATR * AvgTrueRange( KPeriod );
KUpperBand = K_Line + Deviation ;
KLowerBand = K_Line - Deviation ;

X = BBUpperBand - KUpperBand;


Reply With Quote
Thanked by:
  #3 (permalink)
Kolnidrei
Lyon/France
 
Posts: 23 since Aug 2012
Thanks Given: 1
Thanks Received: 14


hi,
in the following way you can also easily
construct all the other calculations you might need...

 
Code
Inputs:
BBPeriod(20),
KPeriod(20),
Mult(2),
FactorATR(1.0);
Vars:
BB_Line(0),StDev(0),BBUpperBand(0),BBLowerBand(0),
K_Line(0),Deviation,KUpperBand(0),KLowerBand(0),X;

BB_Line = Average(Close, BBPeriod);
StDev = StandardDev( Close, BBPeriod, 1 );
BBUpperBand = BB_Line + Mult * StDev ;
BBLowerBand = BB_Line + Mult * StDev * -1 ;

K_Line = Average(Close, KPeriod);
Deviation = FactorATR * AvgTrueRange( KPeriod );
KUpperBand = K_Line + Deviation ;
KLowerBand = K_Line - Deviation ;

X = BBUpperBand - KUpperBand;


Reply With Quote
Thanked by:
  #4 (permalink)
 apmodeler 
Boise, Idaho
 
Experience: Intermediate
Platform: TOS
Trading: Stocks
Posts: 37 since Aug 2013
Thanks Given: 56
Thanks Received: 9

Kolnidrei, thank you so very much!!😀


Started this thread Reply With Quote




Last Updated on November 14, 2021


© 2026 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 - Downloads - Top
no new posts