Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need help with a multi time frame strategy

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

    Need help with a multi time frame strategy

    I'm trying to add a lower time frame data type to my strategy.

    I have a custom data type installed called ninZaRenko. This indicator takes a Brick size and a Trend size.

    NinZaRenko is installed with an enum value of 12345.

    When I try this command, AddDataSeries((BarsPeriodType)12345,4,1) // Brick Size = 4, Trend Size = 1, I get the error code CS1502.

    This is because AddDataSeries() only accepts two arguments and not three.

    What is the proper command to add this datatype to my strategy?

    #2
    Originally posted by SilverSurfer1 View Post
    What is the proper command to add this datatype to my strategy?
    ninZaRenko used to have a Trader's Manual that you could download.

    Here is an excerpt,

    Code:
    protected override void OnStateChange()
    {
        ...
        if (State == State.Configure)
        {
            ...
            AddDataSeries(new BarsPeriod() {
                BarsPeriodType = (BarsPeriodType)12345, // ninZaRenko’s ID
                Value = 8,                              // Brick Size
                Value2 = 4                              // Trend Threshold
            });
            ...
        }
        ...
    }​
    I've attached mine below.
    Attached Files

    Comment


      #3
      Thank you so much for the response.

      I didn't know about the trading manual.

      Regards,
      R. C.

      Comment


        #4
        Hello SilverSurfer1,

        Thanks for your post.

        For custom bar types there is a note in the help guide on AddDataSeries() in the Tips section.

        "2. You can add a custom BarsType which is installed on your system by casting the registered enum value for that BarsPeriodType. For example: AddDataSeries((BarsPeriodType)14, 10);
        3. You can specify optional BarsPeriod values (such as Value2) of a custom BarsType in the BarsPeriod object initializer. For example: AddDataSeries(new BarsPeriod() { BarsPeriodType = (BarsPeriodType)14, Value = 10, Value2 = 20 });"


        AddDataSeries(): https://ninjatrader.com/support/help...dataseries.htm

        Here is a Bars Type Identifier indicator that will return the id.
        https://ninjatraderecosystem.com/use...pe-identifier/


        The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        44 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        124 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        65 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X