Quick EasyLanguage Question

jxbjxbjxb

Newbie
Messages
2
Likes
0
Hi,

I'm not yet a TS user, but am considering it as I wish to program trading strategies. I do have a programming background.

I've been reading the EasyLanguage reference guide. I am wondering if technical indicators, such as Bollinger Bands and Moving Averages can be called with reference to previous bars in much the same way as High or Low can, such as High[2] to reference the high of the bar 2 bars ago. Can one find the upper Bollinger Band point from two bars ago in the same fashion, or can these technical indicators only be called to incorporate their current bar values?

Thanks.
 
I am pretty sure that you can do what you are wanting to. All you would need to do is define a variable that would be the Bollinger Indicator and then as you have said reference it any number of bars back that you wanted.

You could look into Multicharts as this also uses Easylanguage.


Paul
 
OK, thanks. I checked out multicharts.com. Looks like the platform is at least as costly as Trade Station. Is there a particular advantage to them over TradeStation? I found it interesting that the company that created multicharts is named "TS"... At first I thought it was related to Trade Station.

J.
 
Multicharts is related to Tradestation but I am not sure in what way, others will know better than I do. I thought it was supposed to be cheaper than TS but if not then it is personal choice as to which is better.


Paul
 
The [1], [2], [3] notation can be used on indicators in the same way it can on bars.

In fact, any variable you declare can be used this way - not just indicators.
 
One major benefit of multicharts is that it offers Portfolio Backtesting. This can be extremely helpful with some strategies such as pair trading. We use both TS and MultiCharts - At first we only had usedTradestation although it was extremely hard / time consuming to backtest one side of the pair at a time in TS therefore we converted the code to MultiCharts and were able to run Portfolio backtests which made our testing much, much easier and also could review an entire portfolio of pairs at one time which was extremely valuable. Note: MC offers a free 30 day trial so you can see if you like the platform for free too.
 
Hi ...

the following code1 indicates actual bollinger band.......below u can see the code2which indicated previous two upper and lower band indication.....

//Code1
inputs:
BollingerPrice( Close ),
TestPriceUBand( Close ),
TestPriceLBand( Close ),
Length( 20 ),
NumDevsUp( 2 ),
NumDevsDn( -2 ),
Displace( 0 ) ;

variables:
Avg( 0 ),
SDev( 0 ),
LowerBand( 0 ),
UpperBand( 0 ),Avg1(0) ;

Avg = AverageFC( BollingerPrice, Length );
SDev = StandardDev( BollingerPrice, Length, 1 ) ;

UpperBand = Avg + NumDevsUp * SDev ;
LowerBand = Avg + NumDevsDn * SDev ;

if Displace >= 0 or CurrentBar > AbsValue( Displace ) then
begin
Plot1[Displace]( UpperBand, "UpperBand" ) ;
Plot2[Displace]( LowerBand, "LowerBand" ) ;
Plot3[Displace]( Avg, "MidLine" ) ;
-------------------------------------------------------------------------------------------------

Code2

inputs:
BollingerPrice( Close ),
TestPriceUBand( Close ),
TestPriceLBand( Close ),
Length( 20 ),
NumDevsUp( 2 ),
NumDevsDn( -2 ),
Displace( 0 ) ;

variables:
Avg( 0 ),
SDev( 0 ),
LowerBand( 0 ),
UpperBand( 0 ),Avg1(0) ;

Avg = AverageFC( BollingerPrice, Length )[2];:arrowl:
SDev = StandardDev( BollingerPrice, Length, 1 ) ;

UpperBand = Avg + NumDevsUp * SDev ;
LowerBand = Avg + NumDevsDn * SDev ;

if Displace >= 0 or CurrentBar > AbsValue( Displace ) then
begin
Plot1[Displace]( UpperBand, "UpperBand" ) ;
Plot2[Displace]( LowerBand, "LowerBand" ) ;
Plot3[Displace]( Avg, "MidLine" ) ;

Pls try it .. and further assistance mail me to
[email protected]
 
Top