- ago
Where I can get access to old strategies like RSI agiita / Ori Rise & Fall V2 that were the stars of earlier version of Wealthlab and to check their current performance VS.
the strategies that were published during the last years.

0
124
2 Replies

Reply

Bookmark

Jump to End
- ago
#1
I wonder if the Wayback Machine would work
0
Cone8
- ago
#2
I don't want to get in the habit of doing this for strategy that exists, but if you have an old machine that ran older versions of WealthLab, all the Strategies are still in the Roaming folder. I'll leave it to you or AI to do the WL9 translation.

RSI Agita: (WL4 code)
CODE:
public class RSIAgita : WealthScript { //Create parameters private StrategyParameter rsiPeriod; private StrategyParameter overbought; private StrategyParameter oversold; public RSIAgita() { rsiPeriod = CreateParameter("RSI Period", 20, 10, 60, 5); oversold = CreateParameter("Oversold", 35, 10, 40, 5); overbought = CreateParameter("Overbought", 45, 40, 80, 5); } protected override void Execute() { int level; int period = rsiPeriod.ValueInt; //Create and plot 20 period RSI RSI rsi20 = RSI.Series(Close, period); ChartPane rsiPane = CreatePane(50, true, true); PlotSeries(rsiPane, rsi20, Color.Navy, LineStyle.Solid, 3); DrawHorzLine(rsiPane, oversold.Value, Color.Red, LineStyle.Dotted, 2); DrawHorzLine(rsiPane, overbought.Value, Color.Green, LineStyle.Dotted, 2); //Trading system main loop for (int bar = period + 1; bar < Bars.Count; bar++) { //Entries are allowed only if price is below last entry price double lastEntryPrice = IsLastPositionActive ? LastPosition.EntryPrice : Double.MaxValue; //Check penetration of RSI below levels 35 down to 5 level = oversold.ValueInt; while (level > 0) { if (CrossUnder(bar, rsi20, level)) if (Bars.Close[bar] < lastEntryPrice) BuyAtMarket(bar + 1); level -= 5; } //Exit all long positions if RSI crosses above 45 if (CrossOver(bar, rsi20, overbought.ValueInt)) foreach (Position pos in Positions) if (pos.Active) SellAtMarket(bar + 1, pos); } } }


ORIRiseAndFallv2: (WL4 code)
CODE:
public class ORIRiseAndFallv2 : WealthScript    {             StrategyParameter strategyParameter1;       // EDIT2       public ORIRiseAndFallv2()       {          strategyParameter1 = CreateParameter("% Trigger", 10, 1, 15, 0.5);       }       protected override void Execute()       {                      double pct = strategyParameter1.Value / 100d;          double rise2 = 0d;          double rise1 = Close[1]/Close[0] - 1d;          for(int bar = 2; bar < Bars.Count; bar++)          {                                     rise2 = rise1;             rise1 = Close[bar]/Close[bar-1] - 1d;                          if( IsLastPositionActive )             {                ExitAtMarket(bar + 1, LastPosition);                                           }                          if( rise1 > pct && rise2 > pct )             {                if( ShortAtMarket(bar + 1) != null )                   LastPosition.Priority = rise1 + rise2;             }             if( rise1 < -pct && rise2 < -pct )             {                if( BuyAtMarket(bar + 1) != null )                   LastPosition.Priority = Math.Abs(rise1 + rise2);                            }                      }       }    }
0

Reply

Bookmark

Jump to Top