• 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

Orders not launched

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

    Orders not launched

    Hi,

    I am working on undertanding how new orders are launched.
    For that, I have a very simple program:

    protected override void OnBarUpdate()
    {
    if (Position.MarketPosition == MarketPosition.Flat)
    if (CrossAbove(SMA(FastLenght), SMA(SlowLenght), 1)){
    entryOrder = EnterLongStop(1, Close[0] + 0.0003);
    ExitLongLimit(Low[0]);
    }
    }

    From this code I understand a new trade should be launched once the price goes above Close + 0.0003. However, I am taking a look at the chart and I can find many situations where the conditions fulfill the requirements but no traders are launched (an example can be found on the picture).

    May you help me understanding why?
    Attached Files

    #2
    Hello jemoce,

    Thank you for your note.

    Using EnterLongStop will submit an order which will be canceled if its not filled on the bar its submitted to.

    If you use the following EnterLongStop syntex, setting liveUntilCancelled to true, do you see entries where you expect them?

    Code:
    EnterLongStop(int barsInProgressIndex, bool liveUntilCancelled, int quantity, double stopPrice, string signalName)
    https://ninjatrader.com/support/help...erlongstop.htm

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by tgn55, Today, 08:57 PM
    0 responses
    1 view
    0 likes
    Last Post tgn55
    by tgn55
     
    Started by chartish, Today, 04:43 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_EricB  
    Started by Trader17, Today, 04:07 PM
    0 responses
    6 views
    0 likes
    Last Post Trader17  
    Started by GussJ, Today, 01:30 PM
    2 responses
    20 views
    0 likes
    Last Post GussJ
    by GussJ
     
    Started by GARZONJ, Today, 12:25 PM
    3 responses
    18 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Working...
    X