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

Scalping - Reversal trading and reentry based on last signal after session exit

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

    #16
    Hello Murali,

    Thanks for your reply.

    The strategy builder is quite limited in what information it has as it is intended for simple strategies.

    In the condition builder, inside the Strategy Folder, you can access the Current position size and Current market position. These would be of the Strategy only. The strategy builder cannot access account information.

    HeikenAshi presents false data on the chart, it is more of a trend indicator than an actual bar. For example, the current bar Heiken Ashi open is created from the previous bars Open price plus Close price times 0.5 so you are not working with real price data and a market order will fill where the price actually is.
    Paul H.NinjaTrader Customer Service

    Comment


      #17
      Hi Paul,

      ok, will check the position size. Could you please tell me how to add a particualt indicators to a data serices

      addchartindicator() to AddDataSeries(), Say i have 2 data series

      AddDataSeries(BarsPeriodType.HeikenAshi, 15) -> I want to add indicator x to 15 min chart
      AddDataSeries(BarsPeriodType.HeikenAshi, 3) -> add indicator y to 3 Min chart

      both are same instruments? Not sure how to add indicator only to a particular dataseries. Please share me some examples.

      Thankyou,
      Murali

      Comment


        #18
        Hello Murali,

        Thanks for your reply.

        If you are using the strategy builder, you cannot add Heiken Ashi bars as a secondary series.

        Here is a short video on adding data series and then using that data series in the strategy builder: https://paul-ninjatrader.tinytake.co...MF8xMTY0NTQyMw

        Paul H.NinjaTrader Customer Service

        Comment


          #19
          I don't use the strategy builder much, I write my own code. I already added using AddHeikenAshi.

          But i see the following error when i try to enable the strategy.

          Strategy 'STScalperV3': Error on calling 'OnBarUpdate' method on bar 0: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.

          Comment


            #20
            Hello Murali,

            Thanks for your reply.

            For working with a multi-timeframe or series script in NinjaScript, please see the help guide here: https://ninjatrader.com/support/help...nstruments.htm This is a large sequential read but it does answer all of your questions, including the error message (hint: CurrentBars[] check)
            Paul H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by fx.practic, 10-15-2013, 12:53 AM
            5 responses
            5,404 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by Shai Samuel, 07-02-2022, 02:46 PM
            4 responses
            95 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by DJ888, Yesterday, 10:57 PM
            0 responses
            7 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by MacDad, 02-25-2024, 11:48 PM
            7 responses
            159 views
            0 likes
            Last Post loganjarosz123  
            Started by Belfortbucks, Yesterday, 09:29 PM
            0 responses
            8 views
            0 likes
            Last Post Belfortbucks  
            Working...
            X