Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

ExitShortStop doesn't works

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

    ExitShortStop doesn't works

    Hi... yes... It's me another time...

    What you think is going wrong in this strategy? exitShortStop doesn't works, why?

    ///<summary>
    /// Called on each bar update event (incoming tick)
    ///</summary>
    protectedoverridevoid OnBarUpdate()
    {
    // Condition set 1
    if (GetHighLowByTimeRange(10, 15, 9, 30).LowestLow[0] != GetHighLowByTimeRange(10, 15, 9, 30).LowestLow[1])
    {
    EnterShortStop(DefaultQuantity, GetHighLowByTimeRange(
    10, 15, 9, 30).LowestLow[0] + -1 * TickSize, "");
    }
    // Condition set 2
    if (Position.MarketPosition == MarketPosition.Short
    && BarsSinceEntry() >
    1)
    {
    ExitShortStop((Position.AvgPrice) * (
    1 + Stop), "", "");
    }
    }

    Thanks a lot.

    #2
    For orders you feel that don't work the first step is to use TraceOrders = true along with Print() to determine if you are submitting valid stop prices. Please see these two articles: http://www.ninjatrader-support.com/v...ead.php?t=3418
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Ashkam, 04-29-2024, 09:28 AM
    4 responses
    43 views
    0 likes
    Last Post Ashkam
    by Ashkam
     
    Started by nightstalker, Yesterday, 02:05 PM
    1 response
    29 views
    0 likes
    Last Post NinjaTrader_Eduardo  
    Started by dcriador, Today, 02:09 PM
    0 responses
    5 views
    0 likes
    Last Post dcriador  
    Started by nicthe, Today, 07:38 AM
    4 responses
    21 views
    0 likes
    Last Post bltdavid  
    Started by cmtjoancolmenero, 04-29-2024, 03:40 PM
    30 responses
    98 views
    0 likes
    Last Post cmtjoancolmenero  
    Working...
    X