Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-instrument problem when lack of data.

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

    Multi-instrument problem when lack of data.

    Hi,

    I have problem displaying plot for multi-instrument when date range of primary instrument less than Data Start Date. E.g.: IBM data exist only from 1/1/2004, but our Start Date is 1/1/2003.

    However, if we change the Start Date to greater than minimum primary date, the plot come out correctly.

    Following lines are my simple example of the code:

    Thanks for your feedback..
    (see example below)
    // ----------
    #region Variables
    // Wizard generated variables
    private int myInput0 = 1; // Default setting for MyInput0
    // User defined variables (add any user defined variables below)
    private string secondInstrument = @"SPX"; // Default setting for SecondInstrument
    #endregion

    /// <summary>
    /// This method is used to configure the indicator and is called once before any bar data is loaded.
    /// </summary>
    protected override void Initialize()
    {
    Add(secondInstrument, PeriodType.Day, 1);

    Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Dot, "Plot0"));
    Overlay = false;
    }

    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {
    // Use this method for calculating your indicator values. Assign a value to each
    // plot below by replacing 'Close[0]' with your own formula.
    Plot0.Set(Close[0]);
    }

    // ------------

    #2
    mdhanafi68, thanks for the report - however I'm not sure I fully follow you - would you mind posting a screenshot of the issue you see on your chart?

    Comment


      #3
      Sample Image

      Hi Bertrand,

      Thanks for reply. Attached herewith 3 sample images.

      For information:
      - Comparing two instrument AIRA (primary) and FBMKLCI (secondary) via "Add(secondInstrument, PeriodType.Day, 1)"
      - OnBarUpdate, it just display "Close[0]" of primary instrument.

      Primary date range:
      - Only has data starting from 8/12/2004.
      - End date for sample test is 13/8/2005.

      Secondary date range:
      1. 8/12/2004-13/8/2005 (Dt-20041208-20050813.jpg) : OK
      2. 1/6/2005-13/8/2005 (Dt-20050601-20050813.jpg) : OK
      3. 10/8/2005-13/8/2005 (Dt-20040810-20050813.jpg) : Error. No yellow dot in the indicator panel & no indicator value display in data box.
      Attached Files

      Comment


        #4
        Thanks for the screenshots mdhanafi68 - are there any errors listed in your Control Center's log tab if you try charting your indicator on the timeframe mentioned in 3?

        Have you tried a data reload already?

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        602 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        347 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        559 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        559 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X