• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Entry orders and plotting more than one valid setup

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

    Entry orders and plotting more than one valid setup

    Hi,

    I've created a strategy in the builder and right now all I want it to do is draw an arrow up (set 1 is long) and arrow down (set 2 is short) when the proper conditions are met for every instance that the setup occurs. Right now, it properly reads all of my inputs but only draws the most current long and short, and no others. How do I get the strategy to draw arrows on all the valid setups in a given period rather than just the latest long and short? I built the same strategy in NT 7 and it plots all the instances correctly, so I know its something that can be done, I think I'm just missing a check box somewhere in NT 8's builder.

    Second question. Once I figure that out, I would like to take the average of candles 1 and 3 ago and place a limit order at the 50% or average price of all 3 once all the conditions are met. Is there a way to do that in the strategy builder, or is that something that needs to be programmed outside of the builder?

    Thanks!
    Seastragg

    #2
    Hello Seastragg,

    Use unique tag names for the drawing objects. We recommend adding CurrentBar in the tag name string builder.

    Below is a link to a forum post that discusses this.
    https://ninjatrader.com/support/foru...630#post838630

    The Strategy Builder is not capable of math. Averaging specific bars (instead of using the SMA for a period of bars) would require unlocking the script and doing addition and division manually.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      Thank you for the first part! Make that change (and looking at the other forum post) helped and made the indicator spit out the arrows like it was supposed to.

      As for the second part, is there a forum post that might help me figure out how to do the averaging and order placing that I can learn from?

      Cheers,
      Seastragg

      Comment


        #4
        Hello Seastragg,

        Below is a link to a forum post with helpful information about getting started with NinjaScript and C#.
        https://ninjatrader.com/support/foru...040#post786040

        A direct link to DoNetPerls division.
        https://www.dotnetperls.com/divide

        And a link to the Microsoft documentation on math operators which includes the + addition operator.
        https://docs.microsoft.com/en-us/dot...etic-operators

        And a link to the Close series for calling the close of a bar with a barsAgo index.
        https://ninjatrader.com/support/help...n-us/close.htm
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Teebone21, Today, 05:03 PM
        1 response
        3 views
        0 likes
        Last Post Teebone21  
        Started by gbulle, Today, 01:17 PM
        4 responses
        14 views
        0 likes
        Last Post gbulle
        by gbulle
         
        Started by CougarMountain, Today, 03:55 PM
        0 responses
        4 views
        0 likes
        Last Post CougarMountain  
        Started by syxforex, Today, 01:13 PM
        3 responses
        13 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by pjsmith, Today, 01:17 PM
        2 responses
        6 views
        0 likes
        Last Post pjsmith
        by pjsmith
         
        Working...
        X