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

using indicator to drive strategy

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

    using indicator to drive strategy

    hi there

    Im bit confused about how to get an indicator to start a buy order.
    I understand that i can use if sentences - to say if some thing is equal or cross over etc.
    But im testing out just using the Ninjacator Daytrader Signal indicator - to start a buy or sell order. But im not compeltely sure when/how i get that action from the inditcator into the strategy? i dont think there is anythign that cross over/below or is equal?

    I hope someone can help :-)

    Thanks

    #2
    Hello KarstenKafl,

    Thanks for your post.

    We would not be able to advise on the particulars of the 3rd party indicator and recommend that you contact them for specific assistance with that indicator.

    In general, in NinjaTrader8, you can use Chart Alerts based on an indicator applied to the chart and according to conditions that you can configure through the conditions builder, one action out of the chart alert is to place an order. Here is a link to our chart alerts: https://ninjatrader.com/support/help...t8/?alerts.htm

    In general, in a strategy that reads an indicator, the indicator may provide a plot signal that can be read by the strategy, typically the signal would be 0 for no signal, +1 to go long or -1 to go short. In this case, we have no knowledge of the 3rd party indicator so the best source of how to use would be from them.

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thank you Paul

      It looks like the developers have made it with this setup - but for some reason i can not get it to "activate" a buy/sell.

      I can see that the setup is like this ncatDayTradingSignal1.LongSignal[0] - and it is a dobule series - but i have tried setting it to anything - like if ncatDayTradingSignal1.LongSignal[0] != 0 - and also opposite if ncatDayTradingSignal1.LongSignal[0] == 0 and nothing is activated.

      So i wonder if Im most likely doing somethign wrong with the time - maybe the signals are never present in the current bar - but only one bar behind?

      So if i wanted to check against the last bar - how would i do that?

      Thanks

      Comment


        #4
        Hello KarstenKafl,

        Thanks for your reply.

        What I would suggest is print out on every bar so that you can see what the value of the series holds on each bar.

        Here is a link to our debugging tips: https://ninjatrader.com/support/help...script_cod.htm

        Something like Print (Time[0]+" Signal = "+ncatDayTradingSignal1.LongSignal[0].ToString());

        "...maybe the signals are never present in the current bar - but only one bar behind?"
        We have no knowledge of the indicator so we could not say but that is possible. If your print statement does not yield results then you may need to do a for loop on each bar to see if there is indeed a "bars ago" type of signal.

        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thanks again Paul

          Now im getting bit confsued - i try with just normal simple EMA straegy - i use 1 minut - and set it to buy if there is cross over - but this strategy also does not do anything... so im considering if misunderstanding the cross over setup. Can i use crossover with on bar close - with 1-5 miunt bars? or do i need to check on each tick?

          Comment


            #6
            Hello KarstenKafl,

            Thanks for your reply.

            I think you better post the code you are using since we are switching subjects.

            You do not need to be on tick data for a crossover event.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              It seems that im trying to use cross above - from EMA - with a price - like ask or bid - but that is not working on bars- is that correct?

              Comment


                #8
                Hello KarstenKafl,

                Thanks for your reply.

                The CrossAbove or CrossBelow methods will work with a data series (the EMA) and a double price value.
                Reference:

                Paul H.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by BarzTrading, Today, 07:25 AM
                2 responses
                13 views
                1 like
                Last Post BarzTrading  
                Started by devatechnologies, 04-14-2024, 02:58 PM
                3 responses
                19 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by tkaboris, Today, 08:01 AM
                0 responses
                3 views
                0 likes
                Last Post tkaboris  
                Started by EB Worx, 04-04-2023, 02:34 AM
                7 responses
                162 views
                0 likes
                Last Post VFI26
                by VFI26
                 
                Started by Mizzouman1, Today, 07:35 AM
                1 response
                9 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Working...
                X