Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

strategy analyzing and new strategy developing - new user

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    strategy analyzing and new strategy developing - new user

    Hi,
    I am trying to develop a new strategy. I took ATR indicator and build some simple strategies (Enter if (ATR1[0] > ATR1[3]), Exit if (ATR1[3] < ATR1[0]). I run it and it works. I could do backtesting and see the results data.

    Second, I wanted to optimize the strategy, thus I change the code by adding Variable (A1).
    I run the strategy on a chart and I can see enter and exit on the chart, also while performing strategy performance I can see the results data.
    Now I tried to do a strategy analyzer -Backtest, and I got nothing.
    1. what is the difference between the backtest and strategy performance?
    2. Why backtesting is not running?

    the code:
    IsInstantiatedOnEachOptimizationIteration = true;
    A1 = 3;

    }
    else if (State == State.Configure)
    {
    AddDataSeries("SPY", Data.BarsPeriodType.Day, 1, Data.MarketDataType.Last);

    }
    else if (State == State.DataLoaded)
    {
    ATRavarag = new Series<double>(this);
    ATR1 = ATR(Close, 14);
    ATR1.Plots[0].Brush = Brushes.DarkCyan;
    AddChartIndicator(ATR1);
    }
    }

    protected override void OnBarUpdate()
    {
    if (BarsInProgress != 0)
    return;

    if (CurrentBars[0] < A1)
    return;

    // Set 1
    if (ATR1[0] > ATR1[A1])
    {
    EnterLong(Convert.ToInt32(DefaultQuantity), @"ATRdown");
    }

    --------
    I tried optimizing the strategy A1= 3;8;1 for instance, and got nothing (it run but no data was received).

    Any direction?

    Thanks

Latest Posts

Collapse

Topics Statistics Last Post
Started by CaptainJack, 05-29-2026, 05:09 AM
0 responses
430 views
0 likes
Last Post CaptainJack  
Started by CaptainJack, 05-29-2026, 12:02 AM
0 responses
282 views
0 likes
Last Post CaptainJack  
Started by charlesugo_1, 05-26-2026, 05:03 PM
0 responses
241 views
1 like
Last Post charlesugo_1  
Started by DannyP96, 05-18-2026, 02:38 PM
1 response
331 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by CarlTrading, 05-11-2026, 05:56 AM
0 responses
292 views
0 likes
Last Post CarlTrading  
Working...
X