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 ageeholdings, 05-01-2024, 05:22 AM
    5 responses
    33 views
    0 likes
    Last Post ageeholdings  
    Started by reynoldsn, Today, 02:34 PM
    0 responses
    6 views
    0 likes
    Last Post reynoldsn  
    Started by nightstalker, Today, 02:05 PM
    0 responses
    11 views
    0 likes
    Last Post nightstalker  
    Started by llanqui, Yesterday, 09:59 AM
    8 responses
    29 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by quicksandatl, Today, 01:39 PM
    1 response
    6 views
    0 likes
    Last Post quicksandatl  
    Working...
    X