Bollinger BandsŪ Message Board
BollingerBands - BollingerOnBollingerBands - BBForex - EquityTrader - FundsTrader - GroupPower - MarketTechnician - PatternPower - BBScript
 
 RegisterRegister   SupportSupport   ProfileProfile   SearchSearch   Log inLog in 

TradeStation EL Code from DVD Seminar

 
Post new topic   Reply to topic    Bollinger BandsŪ Message Board Forum Index -> BBForex General
View previous topic :: View next topic  
Author Message
ronald.wanat@gmail.com



Joined: 20 Apr 2008
Posts: 1

PostPosted: Thu Jul 31, 2008 1:57 pm    Post subject: TradeStation EL Code from DVD Seminar Reply with quote

Hi John,

I purchased the DVD seminar and was wondering if you could provide the EL Code for your examples?

I know it only takes about 10 minutes to enter the code, but I attempted to create the indicator listed below from Slide #43 (Titled: Trend Following System--Tradestation Code) but it did not compile. And I want to ensure that I do not enter any potential typos which may have inadvertantly made it into the presentation.

Thanks very much,
Ron Wanat

****************************** BEGIN CODE *********
Variables: signal(0);

if BB_pctb > 0.8 and BB_MFI(10) > 80 Then begin
signal=1;
Alert("Confirmed Strength");
end
else
if BB_pctb < 0.2 and BB_MFI(10) < 20 Then begin
signal=-1;
Alert("Confirmed Weekness");
end
else
signal=0;
Plot1(signal, "BB-Strength");

********************** END CODE ***************
Back to top
View user's profile Send private message
bbands@bollingerbands.com
Site Admin


Joined: 08 Feb 2008
Posts: 246

PostPosted: Fri Aug 08, 2008 12:29 pm    Post subject: Reply with quote

The indicator, MFI, the Money Flow Index, in this code requires volume.
As volume is not reported in the forex markets, this code will not work for forex. To get it to work for other markets, you need to write the %b and MFI indicators that are referenced in your example and then it will compile.

jab
Back to top
View user's profile Send private message Send e-mail
david.palmer4@virgin.net



Joined: 14 Aug 2008
Posts: 1

PostPosted: Mon Nov 03, 2008 9:56 am    Post subject: MFI Reply with quote

MFI can work on Tradestation, Esignal and Metatrader4 as they all display 'tick' volume (number of trades per bar) for Forex. I am not familiar with Tradestation syntax, it is probably a typo such as a capital letter in the wrong place.

dumpfox
Back to top
View user's profile Send private message
bbands@bollingerbands.com
Site Admin


Joined: 08 Feb 2008
Posts: 246

PostPosted: Fri Mar 27, 2009 7:53 am    Post subject: Reply with quote

Then in order to get it to work you need to the two functions that the routine calls, BB_pctb and BB_MFI(10). MFI is probably already available on your TS, so just rename its call to your local MFI function name. Then enter the code for BB_pctb. Below is an example. Finally, change are the upper and lower band function calls, BBTK_upperBB and BBTK_lowerBB, to whatever the corresponding Bollinger Band function calls are on your system ands away you go.

Code:

Input: BBdata(NumericSeries), BBperiods(NumericSimple), BBwidth(NumericSimple);

Variables: pctb(0), upperBB(0), lowerBB(0);

upperBB = BBTK_upperBB(BBdata, BBperiods, BBwidth);
lowerBB = BBTK_lowerBB(BBdata, BBperiods, BBwidth);

if (upperBB-lowerBB) > 0 then
   pctb = (BBdata - lowerBB) / (upperBB - lowerBB)
else
   pctb = 0.5;

BBTK_pctb = pctb;


I hope that helps,

jab
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Bollinger BandsŪ Message Board Forum Index -> BBForex General All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group