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

Need 'small' assist to modify the BOP indicator

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

    Need 'small' assist to modify the BOP indicator

    Greetings,

    Trying to learn the NTScripting : starting small, swapping out the SMA from BOP and inserting T3 smoother, and it wont compile and I cant understand the ':' error ... the code is here with the error area commented with //ERROR

    Can someone suggest the correct fix please?

    TIA !!
    TJ


    bop =
    new DataSeries(this);
    Overlay =
    false;
    PriceTypeSupported =
    false;
    }

    ///<summary>
    /// Called on each bar update event (incoming tick)
    ///</summary>
    protectedoverridevoid OnBarUpdate()
    {
    if ((High[0] - Low[0]) == 0)
    {
    bop.Set(
    0);
    }
    else
    {
    bop.Set((Close[
    0] - Open[0]) / (High[0] - Low[0]));
    }
    Value.Set(T3 (0.618, 13))(bop, smooth)[0]);//ERROR !!
    }
    #region Properties


    ///<summary>
    ///</summary>

    [Description("Periods to use for T3 smoothing of the indicator.")]
    [Category(
    "Parameters")]

    #2
    Trader.Jon, you would need to check the exact overload the T3 uses, most likely something like this -

    myT3Bop = T3(bop, Parameter1, Parameter2 etc)...
    BertrandNinjaTrader Customer Service

    Comment


      #3
      BOP continuing saga

      Bertrand,

      Thanks for the input.

      I ran into another snag I hope to resolve: I am trying to expand the range of the calculations to go back a few ticks and I get no output to either the chart or the DataBox.

      This is what I tried, plus various permutations, and consistently no output ...

      if ((High[2] - Low[0]) == 0)
      {
      bop.Set(
      0);
      }
      else
      {
      bop.Set((Close[
      0] - Open[2]) / (High[2] - Low[0]));

      Comment


        #4
        Do you have the needed CurrentBar check at the OnBarUpdate() start?

        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Rodriguez, 08-23-2023, 12:26 PM
        3 responses
        1,164 views
        0 likes
        Last Post clodoaldoemunah  
        Started by tkaboris, Today, 06:27 AM
        0 responses
        8 views
        0 likes
        Last Post tkaboris  
        Started by kevinenergy, Yesterday, 12:01 PM
        4 responses
        15 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by DawnTreader, 05-08-2024, 05:58 PM
        7 responses
        29 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by sgordet, Today, 05:24 AM
        0 responses
        10 views
        0 likes
        Last Post sgordet
        by sgordet
         
        Working...
        X