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 CarlTrading, 03-31-2026, 09:41 PM
1 response
45 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by CarlTrading, 04-01-2026, 02:41 AM
0 responses
21 views
0 likes
Last Post CarlTrading  
Started by CaptainJack, 03-31-2026, 11:44 PM
0 responses
31 views
1 like
Last Post CaptainJack  
Started by CarlTrading, 03-30-2026, 11:51 AM
0 responses
50 views
0 likes
Last Post CarlTrading  
Started by CarlTrading, 03-30-2026, 11:48 AM
0 responses
42 views
0 likes
Last Post CarlTrading  
Working...
X