Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Modifying NT SampleScaleOut

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

    Modifying NT SampleScaleOut

    hello, I was trying to modify (adding short entries) this NT system, but after I compiled the code the system does NOT gives any short entries, why is that? Here is the code, hope you can help me:

    ///<summary>
    /// Called on each bar update event (incoming tick)
    ///</summary>
    protectedoverridevoid OnBarUpdate()
    {
    // Entry Condition: When the Low crosses below the lower bollinger band, enter long
    if (CrossBelow(Low, Bollinger(2, 14).Lower, 1))
    {
    // Only allow entries if we have no current positions open
    if (Position.MarketPosition == MarketPosition.Flat)
    {
    /* Enters two long positions.
    We submit two orders to allow us to be able to scale out half of the position at a time in the future.
    With individual entry names we can differentiate between the first half and the second half of our long position.
    This lets us place a Profit Target order only for the first half and Trail Stops for both. */
    EnterLong("Long 1a");
    EnterLong(
    "Long 1b");
    }
    }
    //Entry Condition: When the High crosses above the higher bollinger band, enter short
    if (CrossAbove(High, Bollinger(2, 14).High, 1))
    {
    // Only allow entries if we have no current positions open
    if (Position.MarketPosition == MarketPosition.Flat)
    {
    /* Enters two short positions.
    We submit two orders to allow us to be able to scale out half of the position at a time in the future.
    With individual entry names we can differentiate between the first half and the second half of our long position.
    This lets us place a Profit Target order only for the first half and Trail Stops for both. */
    EnterShort("Short 1a");
    EnterShort(
    "Short 1b");
    }
    }
    }

    #2
    futuros, which EntryHandling / EntriesPerDirection are you using with this modification? Would you see shorts if you let the strategy reverse, too (so without the check for being flat)?

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    630 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    364 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    566 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    568 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X