Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

summation High/summation bar

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

    summation High/summation bar

    Hi,
    (1)I try to get the average of high by getting the summation of high from the first bar of session to the current bar and divides the summation of number of bars from the first bar of session to the current bar.Compiled but not plotting.Where am I wrong?Help needed.

    protected override void Initialize()
    {
    Add(new Plot(Color.Green, "Hiline"));
    PriceTypeSupported = true;
    }
    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {

    int bar =Bars.BarsSinceSession;
    double mean =SUM(High,bar)[0];
    Hi.Set (mean);
    pp.Set (bar);
    Hiline.Set (Hi[0]/pp[0]);


    }
    #region Properties
    /// <summary>
    /// </summary>
    [Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
    [XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
    public DataSeries Hiline
    {
    get { return Values[0]; }
    }

    (2) If I want to do the same on different time frame(for eg,10 minutes, 23 minutes and so forth),Where should I start?
    Last edited by K. SATO; 05-02-2010, 03:57 PM.

    #2
    1. Can you please check your Control Center logs for any runtime errors?

    2. You would need to run your indicator on the different time frame you wish to use. Unfortunately NT6.5 does not support multi-time framed indicators.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hi Josh,
      Today is the worst.I couldn't even load the indicator and the program had to shut down.I had sent the "log and trace" file to Ninja support and asked them to refer to this post. Note:- Only the two indicators created lately caused this problem,others are fine.
      Attached Files

      Comment


        #4
        Thanks K. SATO, we received those files and responded, please check your inbox. Thanks.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by stafe, 04-15-2024, 08:34 PM
        9 responses
        41 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by frslvr, 04-11-2024, 07:26 AM
        7 responses
        111 views
        1 like
        Last Post caryc123  
        Started by rocketman7, Today, 09:41 AM
        3 responses
        8 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by traderqz, Today, 09:44 AM
        2 responses
        5 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by rocketman7, Today, 02:12 AM
        7 responses
        31 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X