Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Discrepancy between history & real time

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

    Discrepancy between history & real time

    Hello,
    My strategy enters a limit order based upon my condition, then changes the limit price if my condition changes. Works fine on history, but when real time, the new order with change is ignored with the Output window stating: Reason='Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties

    Here is my entry:
    if (my condition)
    entryOrder = EnterLongLimit(0,true,NumContracts,DonchianChannel (DonchianPeriod)[0]+TickSize,"Monkey Long");

    Here is where I change the limit price
    if(my conditions changes)
    CancelOrder(entryOrder);
    entryOrder = null;
    entryOrder = EnterLongLimit(0,true,NumContracts,DonchianChannel (DonchianPeriod)[0]+TickSize,"Monkey Long");

    I've got the following code in Initialize()
    EntriesPerDirection = 1;
    EntryHandling = EntryHandling.AllEntries;
    I've tried just commenting out the Entries code, but still get the same results. It ignores the order. Why does it tell my I'm exceeding my limit, when I first cancel the existing order, before placing the new order?

    Thanks.

    #2
    Hello TheWolf,

    This could be a result of the previous order was not canceled before the new order was placed. Have you tried it without canceling the order and setting entryOrder to null?

    By having the same signal name it should modify the price of your current order if it is not filled.


    Let us know if we can be of further assistance.
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    95 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    49 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    31 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    35 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    72 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X