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 kinfxhk, 07-14-2026, 09:39 AM
0 responses
13 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-13-2026, 10:18 AM
0 responses
59 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-13-2026, 09:50 AM
0 responses
42 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-13-2026, 07:21 AM
0 responses
47 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-11-2026, 02:11 AM
0 responses
38 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Working...
X