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, 04-25-2024, 06:53 PM
    2 responses
    16 views
    0 likes
    Last Post Massinisa  
    Started by Creamers, Today, 05:32 AM
    0 responses
    4 views
    0 likes
    Last Post Creamers  
    Started by Segwin, 05-07-2018, 02:15 PM
    12 responses
    1,785 views
    0 likes
    Last Post Leafcutter  
    Started by poplagelu, Today, 05:00 AM
    0 responses
    3 views
    0 likes
    Last Post poplagelu  
    Started by fx.practic, 10-15-2013, 12:53 AM
    5 responses
    5,407 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Working...
    X