Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IOrder Handling

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

    IOrder Handling

    If I use this code for order handling:

    private IOrder entryOrder = null;
    protected override void OnBarUpdate()
    {
    if (entryOrder == null && Close[0] > Open[0])
    entryOrder = EnterLong();
    }


    and I set stops for this order I have to code also: entryOrder =SetStopLoss(...) ?
    I have also to write entryOrder = ExitLong(); ?


    thanks

    #2
    guillembm, you would take another IOrder object for your exit order, however the Set() methods don't offer any IOrder returns, you could self capture them though :

    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    942 views
    0 likes
    Last Post spwizard  
    Started by Max238, Today, 01:28 AM
    0 responses
    9 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by rocketman7, Today, 01:00 AM
    0 responses
    4 views
    0 likes
    Last Post rocketman7  
    Started by wzgy0920, 04-20-2024, 06:09 PM
    2 responses
    28 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 02-22-2024, 01:11 AM
    5 responses
    33 views
    0 likes
    Last Post wzgy0920  
    Working...
    X