NexusFi: Find Your Edge


Home Menu

 





Acceleration Bands


Discussion in TradeStation

Updated
      Top Posters
    1. looks_one AnvilRob 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 AnvilRob with 0.2 thanks per post
    1. trending_up 4,025 views
    2. thumb_up 11 thanks given
    3. group 6 followers
    1. forum 13 posts
    2. attach_file 4 attachments




 
Search this Thread

Acceleration Bands

  #1 (permalink)
 
AnvilRob's Avatar
 AnvilRob 
Smithfield, VA
Legendary Options Mando
 
Experience: Advanced
Platform: Tasty Trade, TradingView
Broker: Tasty Trade
Trading: Futures: Everything
Frequency: Daily
Duration: Weeks
Posts: 641 since May 2017
Thanks Given: 347
Thanks Received: 965

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 NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Deepmoney LLM
Elite Quantitative GenAI/LLM
Futures True Range Report
The Elite Circle
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
GFIs1 1 DAX trade per day journal
18 thanks
The Program
18 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

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
Thanked by:
  #3 (permalink)
 olobay 
Montreal
 
Experience: Intermediate
Platform: MultiCharts
Broker: DeepDiscountTrading.com
Trading: CL
Posts: 364 since Jul 2011



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
  #4 (permalink)
 
AnvilRob's Avatar
 AnvilRob 
Smithfield, VA
Legendary Options Mando
 
Experience: Advanced
Platform: Tasty Trade, TradingView
Broker: Tasty Trade
Trading: Futures: Everything
Frequency: Daily
Duration: Weeks
Posts: 641 since May 2017
Thanks Given: 347
Thanks Received: 965


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://nexusfi.com/NexusFi mobile app

My trading plan: Anvils 2024 Trading Plan
Journal 2024 first trade: Link to first 2024 trade entry
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

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
Thanked by:
  #6 (permalink)
 mailonline38 
Sanjose, CA
 
Experience: Beginner
Platform: TradeStation
Trading: TF, YM
Posts: 28 since Dec 2009
Thanks Given: 73
Thanks Received: 15


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
Thanked by:
  #7 (permalink)
 
AnvilRob's Avatar
 AnvilRob 
Smithfield, VA
Legendary Options Mando
 
Experience: Advanced
Platform: Tasty Trade, TradingView
Broker: Tasty Trade
Trading: Futures: Everything
Frequency: Daily
Duration: Weeks
Posts: 641 since May 2017
Thanks Given: 347
Thanks Received: 965


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 NexusFi mobile app

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 NexusFi Trade Journal Started this thread Reply With Quote
  #8 (permalink)
 
AnvilRob's Avatar
 AnvilRob 
Smithfield, VA
Legendary Options Mando
 
Experience: Advanced
Platform: Tasty Trade, TradingView
Broker: Tasty Trade
Trading: Futures: Everything
Frequency: Daily
Duration: Weeks
Posts: 641 since May 2017
Thanks Given: 347
Thanks Received: 965


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 NexusFi Trade Journal Started this thread Reply With Quote
  #9 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,507 since Aug 2011
Thanks Given: 2,046
Thanks Received: 9,491

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 NexusFi Trade Journal Reply With Quote
  #10 (permalink)
 olobay 
Montreal
 
Experience: Intermediate
Platform: MultiCharts
Broker: DeepDiscountTrading.com
Trading: CL
Posts: 364 since Jul 2011


@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




Last Updated on January 19, 2018


© 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