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 NullPointStrategies, Today, 05:17 AM
0 responses
20 views
0 likes
Last Post NullPointStrategies  
Started by argusthome, 03-08-2026, 10:06 AM
0 responses
119 views
0 likes
Last Post argusthome  
Started by NabilKhattabi, 03-06-2026, 11:18 AM
0 responses
63 views
0 likes
Last Post NabilKhattabi  
Started by Deep42, 03-06-2026, 12:28 AM
0 responses
41 views
0 likes
Last Post Deep42
by Deep42
 
Started by TheRealMorford, 03-05-2026, 06:15 PM
0 responses
45 views
0 likes
Last Post TheRealMorford  
Working...
X