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

Stops/ Multiple Entries per Direction

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

    Stops/ Multiple Entries per Direction

    Hello. I had a question regarding how stops work in the context of multiple entries per direction.
    It appears that when I allow multiple entries per direction, while the entry prices are all different, the stop prices seem to be set at the level for the first trade. So when i review the trades. So if I cap entries per direction at 3, I might have 3 short entries at various prices, but when they get stopped out it's all at prices corresponding to the first entry, and then it resets for the next set of trades.
    This isn't necessarily undesirable, but just want to make sure this makes sense, or if there is a setting somewhere that I'm missing, or perhaps an err in my code.

    The rough code is below... so I'm just setting the stop at a constant number of ticks.

    if (Stuff)
    {
    Print("******************************************* *************");
    Print("Enter Outside Short");
    }
    stopLoss = Constant1
    profitTarget = Constant2
    SetStopLoss(CalculationMode.Ticks, stopLoss);
    SetProfitTarget(CalculationMode.Ticks, profitTarget);
    EnterShort(shares,"myEntryOrder");
    // return;

    #2
    Hello stewarco,

    Were these entries all within the same bar or very close to the same price?

    Without more details it would be difficult to say however if your overall plan is to always have multiple entries per direction it is usually suggested to use unique signal names in that situation. Using signal names allows the platform to more easily pair the trades or reference a specific entry for pricing.




    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      hi Jesse. They weren't same bar/ same price which is why i was surprised. Just wanted to make sure it wasn't somehow intentionally arranged this way.. i will use multiple signals to resolve. Thanks.

      Comment


        #4
        Hello stewarco,

        From the given sample I don't really see what would have made the price the same for the separate entries, generally if you reset the stop by calling it before the entry like you have it would use the values from that time. The only item I see would be the variable you marked as constant, if that is indeed a constant I don't really see what would cause that. If you are still having difficulty after using the signal names could you attach a more complete sample so I can either see more of the context or try and run it?

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by funk10101, Today, 12:02 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by GLFX005, Today, 03:23 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by nandhumca, Yesterday, 03:41 PM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by The_Sec, Yesterday, 03:37 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by vecnopus, Today, 06:15 AM
        0 responses
        1 view
        0 likes
        Last Post vecnopus  
        Working...
        X