Acceleration Bands - futures io
futures io



Acceleration Bands


Discussion in TradeStation

Updated
      Top Posters
    1. looks_one TradeTheLevel with 6 posts (1 thanks)
    2. looks_two ABCTG with 4 posts (5 thanks)
    3. looks_3 olobay with 2 posts (4 thanks)
    4. looks_4 mailonline38 with 1 posts (1 thanks)
      Best Posters
    1. looks_one olobay with 2 thanks per post
    2. looks_two ABCTG with 1.3 thanks per post
    3. looks_3 mailonline38 with 1 thanks per post
    4. looks_4 TradeTheLevel with 0.2 thanks per post
    1. trending_up 1,909 views
    2. thumb_up 11 thanks given
    3. group 6 followers
    1. forum 13 posts
    2. attach_file 4 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,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
 

Acceleration Bands

(login for full post details)
  #1 (permalink)
 TradeTheLevel 
Yorktown, VA
 
Experience: Intermediate
Platform: Motivewave, Zanner, TView
Broker: DeCarley
Trading: Currency
 
TradeTheLevel's Avatar
 
Posts: 408 since May 2017
Thanks: 202 given, 649 received

Coders,

Would any of y'all be able to make an acceleration bands indicator for tradestation? I have the code from tradingview which is pine script. Im not sure if it helps or not.

 
Code
study("Acceleration Bands", overlay=true)
factor= input(0.001)
length = input(20)
Upperband = high * ( 1 + 2 * (((( high - low )/(( high + low ) / 2 )) * 1000 ) * factor ))
Lowerband = low * ( 1 - 2 * (((( high - low )/(( high + low ) / 2 )) * 1000 ) * factor ))
Central = (Upperband  + Lowerband) / 2

ma(src, len) => sma(src, len)

plot(ma(Upperband, length), color=red)
plot(ma(Central, length), color=orange)
plot(ma(Lowerband, length), color=red)

Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote

Journal Challenge April 2021 results (now extended!):
Competing for $1800 in prizes from Jigsaw
looks_oneMaking a Living with the Microsby sstheo
(302 thanks from 30 posts)
looks_twoSalao's Journalby Salao
(80 thanks from 13 posts)
looks_3Deetee’s DAX Trading Journal (time based)by Deetee
(50 thanks from 20 posts)
looks_4Learning to Profit - A journey in algorithms and optionsby Syntax
(38 thanks from 16 posts)
looks_5Maybe a little bit different journalby Malykubo
(17 thanks from 18 posts)
 
Best Threads (Most Thanked)
in the last 7 days on futures io
The Crude Dude Oil Trading System
122 thanks
Big Mike in Ecuador
60 thanks
Help improve the FIO community
38 thanks
Next New Poll Ideas/Suggestions
20 thanks
www.isystems.com
16 thanks
 
(login for full post details)
  #2 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,238 since Apr 2013
Thanks: 417 given, 1,489 received

TradeTheLevel,

you will be able to find a few studies in the official Tradestation forum, this should get you going.

Apart from that with making "factor and length" inputs and UpperBand, LowerBand and Central variables, the code
you posted won't require much of a change, except a semicolon at the end of every statement. Finally using the three variables as price input for the Average function will give you the three smoothed band values that you can then plot.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
The following user says Thank You to ABCTG for this post:
 
(login for full post details)
  #3 (permalink)
 olobay 
Montreal
 
Experience: Intermediate
Platform: MultiCharts
Broker: IB Canada/Rithmic
Trading: CL
 
Posts: 344 since Jul 2011
Thanks: 391 given, 493 received



TradeTheLevel View Post
Coders,

Would any of y'all be able to make an acceleration bands indicator for tradestation? I have the code from tradingview which is pine script. Im not sure if it helps or not.

 
Code
study("Acceleration Bands", overlay=true)
factor= input(0.001)
length = input(20)
Upperband = high * ( 1 + 2 * (((( high - low )/(( high + low ) / 2 )) * 1000 ) * factor ))
Lowerband = low * ( 1 - 2 * (((( high - low )/(( high + low ) / 2 )) * 1000 ) * factor ))
Central = (Upperband  + Lowerband) / 2

ma(src, len) => sma(src, len)

plot(ma(Upperband, length), color=red)
plot(ma(Central, length), color=orange)
plot(ma(Lowerband, length), color=red)

I coded most of it but I'm not sure about this line:

ma(src, len) => sma(src, len)

Maybe @ABCTG can shed some light? As it's coded right now, it's almost exactly the same as Keltner bands with the same length but a 2.5 ATR. Compare it on a TradingView chart .

 
Code
Input: factor(0.001), length(20);

Vars: Upperband(0), Lowerband(0), Central(0);

Upperband = high * ( 1 + 2 * (((( high - low )/(( high + low ) / 2 )) * 1000 ) * factor ));
Lowerband = low * ( 1 - 2 * (((( high - low )/(( high + low ) / 2 )) * 1000 ) * factor ));
Central = (Upperband  + Lowerband) / 2;

//ma(src, len) => sma(src, len)  NOT SURE WHAT THIS DOES

plot1(Average(Upperband, length));
plot2(Average(Central, length));
plot3(Average(Lowerband, length));

Reply With Quote
The following 2 users say Thank You to olobay for this post:
 
(login for full post details)
  #4 (permalink)
 TradeTheLevel 
Yorktown, VA
 
Experience: Intermediate
Platform: Motivewave, Zanner, TView
Broker: DeCarley
Trading: Currency
 
TradeTheLevel's Avatar
 
Posts: 408 since May 2017
Thanks: 202 given, 649 received


olobay View Post
I coded most of it but I'm not sure about this line:

ma(src, len) => sma(src, len)

Maybe @ABCTG can shed some light? As it's coded right now, it's almost exactly the same as Keltner bands with the same length but a 2.5 ATR. Compare it on a TradingView chart .

 
Code
Input: factor(0.001), length(20);

Vars: Upperband(0), Lowerband(0), Central(0);

Upperband = high * ( 1 + 2 * (((( high - low )/(( high + low ) / 2 )) * 1000 ) * factor ));
Lowerband = low * ( 1 - 2 * (((( high - low )/(( high + low ) / 2 )) * 1000 ) * factor ));
Central = (Upperband  + Lowerband) / 2;

//ma(src, len) => sma(src, len)  NOT SURE WHAT THIS DOES

plot1(Average(Upperband, length));
plot2(Average(Central, length));
plot3(Average(Lowerband, length));

Thanks for doing this. I'll take a look when im able. From what I can tell online, the formula is all you need. Not sure what the extra like is. I have no idea how to code. But some things I can point out understand.

Sent using the https://futures.io%20mobile%20app

Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #5 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,238 since Apr 2013
Thanks: 417 given, 1,489 received

olobay,

good job. The line you are not sure about appears to be a function declaration and it wouldn't be needed in EasyLanguage.

Regards,

ABCTG


olobay View Post
I coded most of it but I'm not sure about this line:

ma(src, len) => sma(src, len)

Maybe @ABCTG can shed some light? As it's coded right now, it's almost exactly the same as Keltner bands with the same length but a 2.5 ATR. Compare it on a TradingView chart .

 
Code
Input: factor(0.001), length(20);

Vars: Upperband(0), Lowerband(0), Central(0);

Upperband = high * ( 1 + 2 * (((( high - low )/(( high + low ) / 2 )) * 1000 ) * factor ));
Lowerband = low * ( 1 - 2 * (((( high - low )/(( high + low ) / 2 )) * 1000 ) * factor ));
Central = (Upperband  + Lowerband) / 2;

//ma(src, len) => sma(src, len)  NOT SURE WHAT THIS DOES

plot1(Average(Upperband, length));
plot2(Average(Central, length));
plot3(Average(Lowerband, length));


Follow me on Twitter Reply With Quote
The following 2 users say Thank You to ABCTG for this post:
 
(login for full post details)
  #6 (permalink)
 mailonline38 
Sanjose, CA
 
Experience: Beginner
Platform: TradeStation
Trading: TF, YM
 
Posts: 26 since Dec 2009
Thanks: 66 given, 13 received


TradeTheLevel View Post
Coders,

Would any of y'all be able to make an acceleration bands indicator for tradestation? I have the code from tradingview which is pine script. Im not sure if it helps or not.

Here is my code which I wrote long time ago.


Quoting 
{Acceleration Bands:
Acceleration Bands are typically used to spot breakouts.
When a stock’s price closes above the upper band consecutively
over a period of two or more bars, the stock’s price may be in
a period of acceleration – that is, its price has made a significant
move over a short period of time. Movement of the close price back
into the band may be a sign that the period of acceleration is coming to an end.
Len_AB 20 to 80}

Input: Len_AB(20);
Vars: Upperband(0), Lowerband(0);

{For upper band}
Upperband = (H*(1+2*((((H-L)/((H+L)/2))*1000)*0.001)));
Plot1(AverageFC(Upperband, Len_AB), "UpBand");

{For lower band}
Lowerband = (L*(1-2*((((H-L)/((H+L)/2))*1000)*0.001)));
Plot2(AverageFC(Lowerband, Len_AB), "LoBand");

Hope it help! Good Trading.

MoL

Reply With Quote
The following user says Thank You to mailonline38 for this post:
 
(login for full post details)
  #7 (permalink)
 TradeTheLevel 
Yorktown, VA
 
Experience: Intermediate
Platform: Motivewave, Zanner, TView
Broker: DeCarley
Trading: Currency
 
TradeTheLevel's Avatar
 
Posts: 408 since May 2017
Thanks: 202 given, 649 received


TradeTheLevel View Post
Thanks for doing this. I'll take a look when im able. From what I can tell online, the formula is all you need. Not sure what the extra like is. I have no idea how to code. But some things I can point out understand.

Sent using the https://futures.io%20mobile%20app

Im pretty new at this. I copied the code in the easy language editor and clicked verify under build. I noticed the indicator showed up in the indicator list.
The indicator prints on the scree like an occilator "for example like how a rsi plots at the bottom of the screen". It should wrap price like bollinger bands do

Here is tradingview


Here is TS

Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #8 (permalink)
 TradeTheLevel 
Yorktown, VA
 
Experience: Intermediate
Platform: Motivewave, Zanner, TView
Broker: DeCarley
Trading: Currency
 
TradeTheLevel's Avatar
 
Posts: 408 since May 2017
Thanks: 202 given, 649 received


mailonline38 View Post
Here is my code which I wrote long time ago.



Hope it help! Good Trading.

MoL

Same thing with yours. How do I get the indicator to wrap around price and add like an oscillator. must be how I built it, or do I need to apply more code? Im very new tradestation so Im trying to learn here.

Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #9 (permalink)
 wldman 
Market Wizard
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
 
wldman's Avatar
 
Posts: 3,341 since Aug 2011
Thanks: 1,978 given, 8,856 received

can you change the display in settings? Or just rip a tiny piece of code?

I am NOT a code guy...the antithesis actually, but I think this can be done pretty easy.

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #10 (permalink)
 olobay 
Montreal
 
Experience: Intermediate
Platform: MultiCharts
Broker: IB Canada/Rithmic
Trading: CL
 
Posts: 344 since Jul 2011
Thanks: 391 given, 493 received


@TradeTheLevel,

I have Multicharts but I assume TS is the same.



When I double click on the indicator on my chart, it opens up a format study window where you can change all the parameters.



I'm sure TS has a similar feature. You need to go to the Properties tab and change it to Subchart 1:



Then you need to go to the Scaling tab and change it to Same as instrument:



I recommend clicking on the Use as default button if you have one in TS to change the default so you don't have to do this every time you apply the indicator.

Reply With Quote
The following 2 users say Thank You to olobay for this post:
 
(login for full post details)
  #11 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,238 since Apr 2013
Thanks: 417 given, 1,489 received

TradeTheLevel,

you will need to apply the indicator to the main chart. To do this you can either set it for the indicator in the Development Environment when you have the code open: File -> Properties and in the new window go to the Scaling tab and set Scale On to "Same Axis as underlying Data".

You can also set this when you add the indicator to a chart by setting Scale On to "Same Axis as underlying Data" on the Scaling tab of the Format Indicator properties window. When you click "Default" in the lower left corner of this window, this setting will be saved as default setting and will always be used now, when applying the indicator to a new chart.

Regards,

ABCTG


TradeTheLevel View Post
Same thing with yours. How do I get the indicator to wrap around price and add like an oscillator. must be how I built it, or do I need to apply more code? Im very new tradestation so Im trying to learn here.


Follow me on Twitter Reply With Quote
The following user says Thank You to ABCTG for this post:
 
(login for full post details)
  #12 (permalink)
 TradeTheLevel 
Yorktown, VA
 
Experience: Intermediate
Platform: Motivewave, Zanner, TView
Broker: DeCarley
Trading: Currency
 
TradeTheLevel's Avatar
 
Posts: 408 since May 2017
Thanks: 202 given, 649 received


ABCTG View Post
TradeTheLevel,

you will need to apply the indicator to the main chart. To do this you can either set it for the indicator in the Development Environment when you have the code open: File -> Properties and in the new window go to the Scaling tab and set Scale On to "Same Axis as underlying Data".

You can also set this when you add the indicator to a chart by setting Scale On to "Same Axis as underlying Data" on the Scaling tab of the Format Indicator properties window. When you click "Default" in the lower left corner of this window, this setting will be saved as default setting and will always be used now, when applying the indicator to a new chart.

Regards,

ABCTG

Thanks I'll try this as soon as I get home. Very much appreciated!

Sent using the https://futures.io%20mobile%20app

Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #13 (permalink)
 TradeTheLevel 
Yorktown, VA
 
Experience: Intermediate
Platform: Motivewave, Zanner, TView
Broker: DeCarley
Trading: Currency
 
TradeTheLevel's Avatar
 
Posts: 408 since May 2017
Thanks: 202 given, 649 received


ABCTG View Post
TradeTheLevel,

you will need to apply the indicator to the main chart. To do this you can either set it for the indicator in the Development Environment when you have the code open: File -> Properties and in the new window go to the Scaling tab and set Scale On to "Same Axis as underlying Data".

You can also set this when you add the indicator to a chart by setting Scale On to "Same Axis as underlying Data" on the Scaling tab of the Format Indicator properties window. When you click "Default" in the lower left corner of this window, this setting will be saved as default setting and will always be used now, when applying the indicator to a new chart.

Regards,

ABCTG


That worked! Thanks a million

Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to TradeTheLevel for this post:
 
(login for full post details)
  #14 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,238 since Apr 2013
Thanks: 417 given, 1,489 received

TradeTheLevel,

you are welcome, I am glad to hear that.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
The following user says Thank You to ABCTG for this post:


futures io Trading Community Platforms and Indicators TradeStation > Acceleration Bands


Last Updated on January 19, 2018


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1,800 in prizes!

April

An Introduction to CME Group Micro Bitcoin Futures w/David Lerman

Elite only
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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