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.
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
The following user says Thank You to ABCTG for this post:
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 .
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));
The following 2 users say Thank You to olobay for this post:
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 .
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.
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 .
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));
The following 2 users say Thank You to ABCTG for this post:
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}
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.
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
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.
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.
The following 2 users say Thank You to olobay for this post:
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
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.
The following user says Thank You to ABCTG for this post:
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!
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
The following user says Thank You to TradeTheLevel for this post: