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 Option Whisperer, Today, 09:05 AM
    0 responses
    1 view
    0 likes
    Last Post Option Whisperer  
    Started by cre8able, Yesterday, 01:16 PM
    3 responses
    11 views
    0 likes
    Last Post cre8able  
    Started by Harry, 05-02-2018, 01:54 PM
    10 responses
    3,203 views
    0 likes
    Last Post tharton3  
    Started by ChartTourist, Today, 08:22 AM
    0 responses
    6 views
    0 likes
    Last Post ChartTourist  
    Started by LiamTwine, Today, 08:10 AM
    0 responses
    2 views
    0 likes
    Last Post LiamTwine  
    Working...
    X