Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

renko secondary bar series not working

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

    renko secondary bar series not working

    the primary bar is Renko with 2 tick brick size, the secondary is Renko 1 tick. I can't print out Hello in the BarsinProgress ==1 bracket, how come? Thanks


    protectedoverridevoid Initialize()
    {
    AddRenko(
    "ES 06-12", 1, MarketDataType.Last);
    //AddRenko(Instrument.FullName, 1, MarketDataType.Last);
    }
    protectedoverridevoid OnBarUpdate()
    {

    if(BarsInProgress == 0 ){
    }
    if(BarsInProgress==1){
    Print(
    "Hello");
    }
    }
    Attached Files
    Last edited by solvmatic; 04-05-2012, 04:07 PM.

    #2
    Hello solvmatic,
    Are you getting any error message? You can find it in the Log tab in Control Center.

    Also please send me your log and trace files for today so that I may look into what occurred.

    You can do this by going to the Control Center-> Help-> Mail to Support.

    Please append Attn:Joydeep in the subject line of the email and give reference to this thread in the body of the email.

    I look forward to assisting you further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      hi Joydeep,

      the log looks fine to me. can you test the script yourself? I tried it with kagi chart, same result, it seems only the thing inside BarsInProgress 0 get processed.

      Thanks



      4/4/2012 8:18 PMStrategyEnabling NinjaScript strategy 'test/3b1667f5c09f40379ecc86b152b3bb01' : On starting a real-time strategy - StrategySync=SubmitImmediately SyncAccountPosition=False EntryHandling=AllEntries EntriesPerDirection=1 StopTargetHandling=PerEntryExecution ErrorHandling=StopStrategyCancelOrdersClosePositio ns ExitOnClose=True/ triggering 30 before close Set order quantity by=Strategy ConnectionLossHandling=KeepRunning DisconnectDelaySeconds=10 CancelEntryOrdersOnDisable=True CancelExitOrdersOnDisable=True CalculateOnBarClose=True MaxRestarts=4 in 5 minutes4/4/2012 8:18 PMStrategyDisabling NinjaScript strategy 'test/3b1667f5c09f40379ecc86b152b3bb01'4/4/2012 8:18 PMStrategyEnabling NinjaScript strategy 'test/3b1667f5c09f40379ecc86b152b3bb01' : On starting a real-time strategy - StrategySync=SubmitImmediately SyncAccountPosition=False EntryHandling=AllEntries EntriesPerDirection=1 StopTargetHandling=PerEntryExecution ErrorHandling=StopStrategyCancelOrdersClosePositio ns ExitOnClose=True/ triggering 30 before close Set order quantity by=Strategy ConnectionLossHandling=KeepRunning DisconnectDelaySeconds=10 CancelEntryOrdersOnDisable=True CancelExitOrdersOnDisable=True CalculateOnBarClose=True MaxRestarts=4 in 5 minutes4/4/2012 8:18 PMStrategyDisabling NinjaScript strategy 'test/3b1667f5c09f40379ecc86b152b3bb01'4/4/2012 7:54 PMStrategyEnabling NinjaScript strategy 'test/3b1667f5c09f40379ecc86b152b3bb01' : On starting a real-time strategy - StrategySync=SubmitImmediately SyncAccountPosition=False EntryHandling=AllEntries EntriesPerDirection=1 StopTargetHandling=PerEntryExecution ErrorHandling=StopStrategyCancelOrdersClosePositio ns ExitOnClose=True/ triggering 30 before close Set order quantity by=Strategy ConnectionLossHandling=KeepRunning DisconnectDelaySeconds=10 CancelEntryOrdersOnDisable=True CancelExitOrdersOnDisable=True CalculateOnBarClose=True MaxRestarts=4 in 5 minutes4/4/2012 7:50 PMDefaultAutomated trading disabled4/4/2012 7:50 PMConnectionOptimized CPU performance enabled4/4/2012 7:50 PMDefaultOrder entry hot keys enabled4/4/2012 7:50 PMConnectionGlobal simulation mode disabled4/4/2012 7:50 PMConnectionTime to flatten=12:00:00 AM, Flatten all=Disabled4/4/2012 7:50 PMPositionInstrument='ES 06-12' Account='Sim101' Avg price=1396.5 Quantity=2 Market position=Long4/4/2012 7:50 PMConnectionZenFire: Primary connection=Connected, Price feed=Connected4/4/2012 7:50 PMConnectionConnecting to NinjaTrader data server (64.202.118.179/31654)4/4/2012 7:50 PMConnectionZenFire: Primary connection=Connecting, Price feed=Connecting4/4/2012 7:50 PMConnectionAuto connecting to 'ZenFire'4/4/2012 7:50 PMDefaultStarting transaction credit = $0.0004/4/2012 7:50 PMDefaultCurrent license: Type=Regular State=Verified StartDate=9/5/2011 EndDate=12/30/2099 Collective2 Dtn ESignal External Provider2 Provider3 Provider7 Replay Simulator Yahoo Hosted AutomatedTrading AdvancedStrategyManagement BasicEntry Charting LiveTrading SuperDom DataConnection SystemDevelopment4/4/2012 7:50 PMDefaultSession Break (Version 7.0.1000.9)
      Last edited by solvmatic; 04-04-2012, 07:05 PM.

      Comment


        #4
        Hello solvmatic,
        I could run the code at my end and the Prints are coming out fine.

        If you are running the code via a strategy, then please make sure you have enough bars to run the code or set Min Bars required property to 0.

        Also please make sure your data provider provides historical tick data or you have enough tick data saved in your historical data base.

        Please let me know if I can assist you any further.
        Attached Files
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Hi Joydeep,

          I changed as you suggested and still not get anything from Bars index 1, btw I am using zenfire, which shouldn't be an issue in this case. The Closes[1][0] works anywhere outside of the BarsInProgress==1 brackets.

          I uploaded my screen capture to my first post, you can see the test strategy can't get any Print();

          ...now don't know where to check.
          I am thinking to reinstall NT7.

          Comment


            #6
            solvmatic, you're running latest NT7R9 here correct?

            If you exit NT7 and then go to this link here - http://www.ninjatrader.com/download-registration.php

            and then repair your current install and recheck, any change in the outcome?

            Thanks,

            Comment

            Latest Posts

            Collapse

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