NexusFi: Find Your Edge


Home Menu

 





Convert from Thinkscript to Easylanguage


Discussion in EasyLanguage Programming

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




 
Search this Thread

Convert from Thinkscript to Easylanguage

  #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?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Strategy stop orders partially filled
EasyLanguage Programming
Cheap historycal L1 data for stocks
Stocks and ETFs
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Funded Trader platforms
32 thanks
Just another trading journal: PA, Wyckoff & Trends
23 thanks
Trading with Intuition
17 thanks
Self sabotage reframed
14 thanks
GFIs1 1 DAX trade per day journal
9 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


© 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