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

Strategy Builder - Using a Buy/Sell indicator

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

    Strategy Builder - Using a Buy/Sell indicator

    Hi There,

    Not sure if this post exists, so sorry if it already has been asked.

    I'm wanting to know how to develop a strategy, using the strategy builder, to make an order based on a buy and sell indicator output.

    For example, I have this custom indicator that prints arrows to enter long or short based on breakouts or breakdowns. I've used the alert method within the indicator to fire a market order when the indicator displays on chart after bar close. The results are not great as the indicator is active all the time (I only want set hours) and also I would like to use limit orders with a tick offset and disappear after 3 or 4 bars have printed on any time frame.

    Is there a way to extract the indicator output and use this in the strategy builder to go long with limit order when the indicator prints buy or go short with limit order when the indicator prints sell.

    Any help would be appreciated.

    Thanks in Advance,

    Marco

    #2
    Hello marco231,

    Thank you for your inquiry.

    When you take a look at the list of indicators available within the Strategy Builder is that custom indicator listed? If so, try printing the plot values to see what it is exposing for data. If one of the plots is a signal, you would be able to use that for your logic.

    Otherwise, if there are no plots (it is not listed in the Strategy Builder) or the plots are not the right value you would not be able to accomplish this from the Strategy Builder. You cold reach out to the developer of the indicator about exposing the buy/sell signals as plot values.

    Please let me know if I can assist further.
    Gaby V.NinjaTrader Customer Service

    Comment


      #3
      Hi Gaby,

      It is listed in the available list of indicators, see below the properties available. Its the smartchannels indicator

      Click image for larger version

Name:	image.png
Views:	48
Size:	21.3 KB
ID:	1296754

      How do I go ahead and print the plot values as for now I'm comparing this statement - numeric value =0 not equal indicator then go long (when the indicator has the plot as buy. This logic works when you set it up as an alert under the indicator and only fires off once. So when you get a sell signal like below, it would enter as a market order on the next candle. However in the strategy builder when using this logic the strategy continuously takes trades and can take 100 trades in a day. Where as the alert would only take the number of signals that was given.

      Click image for larger version

Name:	image.png
Views:	37
Size:	79.6 KB
ID:	1296755

      Let me know if you can assist.

      Comment


        #4
        Hello marco231,

        In the actions, under Misc > select Print. Click on "set" next to message, then you can set up your print statement.

        The attached screenshot demonstrates printing out the current value of a 14 period SMA. String 0 is a text label, and String 1 I have set to print out the value of the SMA.

        Please let me know if I can assist further.
        Attached Files
        Gaby V.NinjaTrader Customer Service

        Comment


          #5
          Awesome , thanks this works! and fires only when the candle prints a signal.

          Thank you so much.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Jonker, Today, 01:19 PM
          0 responses
          1 view
          0 likes
          Last Post Jonker
          by Jonker
           
          Started by futtrader, Today, 01:16 PM
          0 responses
          4 views
          0 likes
          Last Post futtrader  
          Started by Segwin, 05-07-2018, 02:15 PM
          14 responses
          1,789 views
          0 likes
          Last Post aligator  
          Started by Jimmyk, 01-26-2018, 05:19 AM
          6 responses
          838 views
          0 likes
          Last Post emuns
          by emuns
           
          Started by jxs_xrj, 01-12-2020, 09:49 AM
          6 responses
          3,294 views
          1 like
          Last Post jgualdronc  
          Working...
          X