NexusFi: Find Your Edge


Home Menu

 





Convert from Thinkscript to Easylanguage


Discussion in EasyLanguage Programming

Updated
    1. trending_up 4,321 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?
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
Quantum physics & Trading dynamics
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
  #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