Professional Documents
Culture Documents
Short Rsi
Short Rsi
using WealthLab.Backtest;
using System;
using WealthLab.Core;
using WealthLab.Indicators;
using finantic.Indicators;
namespace WealthScript10
{
public class MyStrategy : UserStrategyBase
{
public MyStrategy() : base()
{
// Book: 4.0 WS: 4.8
AddParameter("Entry Limit %", ParameterType.Double, 4.8, 1.0,
4.0, 0.1); // 0
// Book: 90.0 WS: 77
AddParameter("RSI Limit", ParameterType.Double, 77, 50.0, 90.0,
1.0); // 1
// Book: 4.0 WS:3.0
AddParameter("Profit %", ParameterType.Double, 3.0, 1.0, 4.5,
0.1); // 2
}
// check data
if(Double.IsNaN(atr10[idx]) || Double.IsNaN(rsi3[idx]) ||
Double.IsNaN(adx7[idx]) ||
Double.IsNaN(avgTurnover[idx])) return;
// private variables
Double profitPct, entryLimitPct, rsiLimit;
IndicatorBase avgTurnover, atr10, rsi3, adx7;
}
}