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

EnterLongLimit() and EnterShortLimit()

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

    EnterLongLimit() and EnterShortLimit()

    Hi, I have some issue that I am not sure how to figure out.

    I have this strategy:

    OBU()
    {
    if(Close[0] < Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).R2[0]
    &&
    Close[0] > Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).R1[0])
    {
    EnterLongLimit(Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).R1[0],"llargs");
    EnterShortLimit(Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).R2[0],"curts");

    }

    }

    Mi aim is to set a long limit order at the R1 pivot just to wait to be filled and the same for the short limit order at the R2 pivot.

    However, with this code only the long orders are filled, the short orders looks like doesn't exist.

    I imagine that probably the two orders are against one of each other, so, what could I make for figure out this?

    Thank you!!

    #2
    Hello alextrd,
    Thanks for your post.

    Internal rules of the Managed Approach will prevent you from placing successive non market orders as entry orders in the opposite direction. More information on these internal rules can be referenced here - https://ninjatrader.com/support/help...antedPositions

    The Unmanaged Approach does not apply the same restrictions and would be advised if you would like to model a bracketed entry. Please see the following link for more information on the Unmanaged Approach: https://ninjatrader.com/support/help...d_approach.htm
    Josh G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Haiasi, Today, 06:53 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by ScottWalsh, Today, 06:52 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by ScottW, Today, 06:09 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by ftsc2022, 10-25-2022, 12:03 PM
    5 responses
    256 views
    0 likes
    Last Post KeyonMatthews  
    Started by Board game geek, 10-29-2023, 12:00 PM
    14 responses
    244 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Working...
    X