Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Builder using named Entries

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

    Strategy Builder using named Entries

    Paul, I feel i've seen or read this process but...
    Is there a way to have the strategy builder generate a unique "signal name" per order so that each order executes only it's own matched "stops and profits" rule.
    E.g. "condition and actions" renders a fill of "order_1" and then again "order_2" and then "order_3" and so on...
    Later "stops and profits" rules close positions based on percentage profit (as price climbs) in reverse closing the most recent orders back (i.e. "order_3", then "order_2" and so on)?

    I realize this would require FILO accounting,

    AA
    Last edited by larkmail; 03-04-2021, 04:49 AM.

    #2
    Optionally, a means of exiting all positions so long as the highest buy (Long) is positive by x-percent. Otherwise hold.

    Currently, the build exit's me out on a "stops and profits" percentage rule but that can still render some of the entries to close at a loss. e.g. the first two orders of ten sell at a loss while the other eight satisfy the profit percentage requirement.

    Thanks,

    AA

    Comment


      #3
      Hello larkmail,

      Thanks for your posts.

      I've moved your posts from the NT7 forum to the more appropriate NT8 strategy forum. We are trying to keep NinjaTrader7 and NinjaTrader8 topics and replies separate as there are some differences and certainly the links to the help guide are different.

      In the Strategy Builder, if you are using the "set" methods for your exits (SetProfitTarget, SetStopLoss, etc.) then you can tie specific exits to specific entries. using signal names. Because the set methods are created before the bars are loaded, they can only be fixed once. By this, I mean that a set method with a specific entry name will only function on an entry with that specific name and there is no means to change the names once the strategy starts.
      Reference: [url]https://ninjatrader.com/support/helpGuides/nt8/?managed_approach.htm[/url]

      For your second post, that would be possible but would require math and the use of a market order to exit (ExitLong).





      Paul H.NinjaTrader Customer Service

      Comment


        #4
        Thanks Paul and apologies for the NJ7 post.

        So i did figure out that you can set the "signal name" within the "EnterLong" action to Convert.ToString(CurrentBars[0]) which applies a unique ID to each trade. I also set the "signal name" within the "Profits" condition "From entry signal" to Convert.ToString(CurrentBars[0]) but now, historically, nothing closes it's position (based on percentage profit of .01). I've included two images. One shows the strategy set to "Unique Entries", which does give me the individual long entries but i can only get them to exit out as a group by leaving the "From entry signal" empty on the "Profits" condition. If I switch to "All entries" it give me the first long and the desired induvial exit but will not allow for the following long entries.

        [ATTACH=JSON]{"data-align":"none","data-size":"full","title":"Capture1.PNG","data-attachmentid":1145143}[/ATTACH]
        (desired entries but wanting each to carry it's own unique profit exit)

        [ATTACH=JSON]{"data-align":"none","data-size":"full","title":"Capture2.PNG","data-attachmentid":1145144}[/ATTACH]
        (one to one but option doesn't allow for the other missed long entries)

        I feel i've missed a check box or something to connect the orders but not sure where.
        As info; I keep trying to set the "Stop & target submission" within the strategy settings to "per entry execution" (as i feel that's the issue) but it doesn't hold the setting when i apply close and then reopen. It defaults back to "By strategy position".

        AA
        Attached Files
        Last edited by larkmail; 03-05-2021, 01:25 PM.

        Comment


          #5
          Paul,

          This weekend i also walked through the setup provided on your forum found [URL="https://ninjatrader.com/support/forum/forum/ninjatrader-8/strategy-development/1099177-increment-or-counter-in-the-strategy-builder"]here[/URL] but had the same end results. All functioned correctly aside from when i try to set the "Profit" target to look to "From signal name". It simply doesn't close anything or find the matching ID. If i set the "Profit" to a particular signal name manually using my method above or the one referenced in said forum it will pick off that one Long but i can't seem to figure out how to, essentially, make each entry a unique/one-off and pair it to it's own immediate "Profit" target. It only renders an exit when i leave the "Profit" target signal blank and this is an averaged exit of multiple entries (longs).

          AA

          Comment


            #6
            Paul, did I lose you?

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Ithinkimlost, Today, 08:50 PM
            0 responses
            2 views
            0 likes
            Last Post Ithinkimlost  
            Started by timmbbo, Today, 08:40 PM
            0 responses
            4 views
            0 likes
            Last Post timmbbo
            by timmbbo
             
            Started by Thamky, Today, 07:28 PM
            0 responses
            5 views
            0 likes
            Last Post Thamky
            by Thamky
             
            Started by Hoffmann, Today, 04:17 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_ShawnB  
            Started by demarcog, Yesterday, 02:24 PM
            8 responses
            30 views
            0 likes
            Last Post NinjaTrader_Kate  
            Working...
            X