• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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
    JoshNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by tgn55, Today, 07:22 AM
    0 responses
    2 views
    0 likes
    Last Post tgn55
    by tgn55
     
    Started by U0000999, Today, 05:17 AM
    0 responses
    4 views
    0 likes
    Last Post U0000999  
    Started by Prataturry89, Today, 03:40 AM
    0 responses
    5 views
    0 likes
    Last Post Prataturry89  
    Started by UltraFastKetoBoost28, Today, 02:43 AM
    0 responses
    6 views
    0 likes
    Last Post UltraFastKetoBoost28  
    Started by kojakojids, Today, 02:04 AM
    0 responses
    5 views
    0 likes
    Last Post kojakojids  
    Working...
    X