[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Active Trader Magazine



PureBytes Links

Trading Reference Links


>
>
> Now that's good Marketing, Volker!
>

Not so bad, but I believed that it was an Omega List, not a WealthLab list.
Not enough room on your own list or should I advertise there too?

Looking at the active trader web, I saw this Jewel using WS  scipt language.
It'a a moving average crossover system.
Wow! I'm able to write the same using 50% less typing in easy language.
May I understand that WS scipt is good to self teach fast typing ?

Sincerely (humm...),

Pierre Orphelin
www.sirtrade.com
TradeStation Technologies representative in France
Safir-X neurofuzzy logic trading system builder

To subscribe to our FREE trading system newsletter:
http://www.sirtrade.com/newsletter.htm





Description: From the article "Moving Average Crossover" in the Trading System
Lab section of the July 2002 issue.

This script implements the moving average crossover system described in the
article, including the additional ATR based exit condition.

WealthScript code: The following WealthScript code can also be used at the
Wealth-Lab.com Web site, or in the Wealth-Lab Developer 2.1 desktop software
product.

var Bar, SMALong, SMAShort: integer;

SMAShort := SMASeries( #Close, 9 );
SMALong := SMASeries( #Close, 36 );
PlotSeries( SMAShort, 0, #Red, #Thin );
PlotSeries( SMALong, 0, #Blue, #Thin );
for Bar := 36 to BarCount - 1 do
begin
  if LastPositionActive then
  begin
    if CrossUnder( Bar, SMAShort, SMALong ) then
      SellAtMarket( Bar + 1, LastPosition, 'SMA' )
    else if
 PriceClose( Bar ) < PositionEntryPrice( LastPosition ) - ATR( Bar, 10 ) * 4
then
      SellAtMarket( Bar + 1, LastPosition, 'ATR' );
  end
  else if CrossOver( Bar, SMAShort, SMALong ) then
    BuyAtMarket( Bar + 1, 'SMA' );
end;