Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsArray Question

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

    BarsArray Question

    Hello.

    I'm using a custom Datatype in a multi time frame indicator. The datatype is called BWTPrecisionRenko

    There are two parameters, as input. to this datatype: The "bricksize" and the "reversal percentage"

    On the primary bar object the following statement compiles cleanly.

    _rcsFT_p = FeltonTrigger(100000,"dummy");

    On the secondary bar object the following statement throws errors.

    _rcsFT_s = FeltonTrigger(BarsArray[1].Period.Value2=125,100000,"dummy")

    The developer says the above syntax is required to define the "reversal percentage" on the custom datatype.

    The error messages indicate that the indicator, Felton Trigger, is "seeing" BarsArray as a parameter value.

    If I code the following, it compiles cleanly.

    _rcsFT_s = FeltonTrigger(BarsArray[1],100000,"dummy")

    So the problem is definitely the "..Period.Value2=125".

    Does that syntax look correct?

    I'm including my code and the following two error messages.

    The best overloaded method match for 'NinjaTrader.Indicator.Indicator.FeltonTrigger(Nin jaTrader.Data.IDataSeries, int, string)' has some invalid arguments

    Argument '1': cannot convert from 'int' to 'NinjaTrader.Data.IDataSeries'
    Attached Files

    #2
    I've never seen such syntax, but it looks like you are assigning 125 to value2 which is also being passed in at the same time?

    But it looks like the compiler is correct in this case. You ARE trying to pass an INT as an iDataSeries.

    Try doing the blahblah.Value2=125 before the FeltonTrigger line, then doing like you have in the commented section?




    Originally posted by rcsingleton View Post
    Hello.

    I'm using a custom Datatype in a multi time frame indicator. The datatype is called BWTPrecisionRenko

    There are two parameters, as input. to this datatype: The "bricksize" and the "reversal percentage"

    On the primary bar object the following statement compiles cleanly.

    _rcsFT_p = FeltonTrigger(100000,"dummy");

    On the secondary bar object the following statement throws errors.

    _rcsFT_s = FeltonTrigger(BarsArray[1].Period.Value2=125,100000,"dummy")

    The developer says the above syntax is required to define the "reversal percentage" on the custom datatype.

    The error messages indicate that the indicator, Felton Trigger, is "seeing" BarsArray as a parameter value.

    If I code the following, it compiles cleanly.

    _rcsFT_s = FeltonTrigger(BarsArray[1],100000,"dummy")

    So the problem is definitely the "..Period.Value2=125".

    Does that syntax look correct?

    I'm including my code and the following two error messages.

    The best overloaded method match for 'NinjaTrader.Indicator.Indicator.FeltonTrigger(Nin jaTrader.Data.IDataSeries, int, string)' has some invalid arguments

    Argument '1': cannot convert from 'int' to 'NinjaTrader.Data.IDataSeries'

    Comment


      #3
      Sledge, thanks for your reply.

      //Secondary Felton Trigger Object
      BarsArray[1].Period.Value2=125;
      _rcsFT_s = FeltonTrigger(BarsArray[1],100000,"dummy");

      The above is compiling cleanly.

      I'll try this out tomorrow, and let you know.

      Comment

      Latest Posts

      Collapse

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