Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trouble with stop ATM Strategy

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

    Trouble with stop ATM Strategy

    Hi,

    I am new in using Ninja Trader. I developped an easy to understand strategy. However, In some case the stop function does not work and I do not understand why.


    I put in copy the strategy script( stop target 19).

    Trouble :see picture trouble. I enter long at 11626 on YM 09-08. My stop is set according to my strategy at 11626 -5 = 11621 However, even if that price is reached, i am still on the market until 11368.

    Can you help me finding the correct script/condition or mistake I may have done?

    Best Regards

    C.S.
    Attached Files

    #2
    Hello C.S.,

    Did the strategy trigger the entry order in real-time or was the entry order submitted on historical data? ATM strategies used in NinjaScript strategies will operate in real-time only. More information can be found at the link below.


    If the strategy triggered the order in real-time, you will need to debug your strategy. More information and helpful tips can be found at the following link.
    JasonNinjaTrader Customer Service

    Comment


      #3
      Hi Jason,

      This is what I did: I created a Strategy using tools/new NinjaScript. I edit it in order to fullfill my expectations, compilated it without trouble and then backtested it using the strategy analyser.

      Probably I was wrong using the term "ATM" strategy in my post, however I think the way I did is according to the stategy development process available in the help guide.

      However after reading your advice, I put on an orange (for long, yellow for short not implemented in the file in copy) dot on the bar[0] which symbolise the position of my stop.
      According to that, I can see that my stop is well positionated.But it is not respected and I do not know why.

      On picture in copy (August_11_2008), you can see that my stop are positionated with orange dot and are following my stop position requirements. However, in the bar I entered in long position, my stop is reached and I don't exit the market. I then exit the market later when the market return and hit my stop which has moved in order to fullfill my strategy.Seems like my stop is not active at the first bar I entered the market and then become active.

      Can you please have a look at the script I did? In my example, It was a great profit but In the previous picture I sent before It was a painfull loss (1250 USD dollar by YM contract! which can close easily and really quickly an account).

      Last two things:

      How can I clear a chart from all long/ short/exit....positions I previously enter manually for exemple and which are not related to the specific strategy I am using? (Ninja script to add in ninja script strategy?)

      If last previous bar is Bar[0], what is the current bar name, current price name in ninja script strategy?( One member kindly proposed me to ask for the price at a specific time). Is there an other way to do?

      Regards

      C.S.
      Attached Files

      Comment


        #4
        Please see if there are any errors shown in the Control Center Logs tab. Then see these tips on debugging your strategy: 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 maybeimnotrader, Yesterday, 05:46 PM
        2 responses
        20 views
        0 likes
        Last Post maybeimnotrader  
        Started by adeelshahzad, Today, 03:54 AM
        5 responses
        32 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by stafe, 04-15-2024, 08:34 PM
        7 responses
        32 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by merzo, 06-25-2023, 02:19 AM
        10 responses
        823 views
        1 like
        Last Post NinjaTrader_ChristopherJ  
        Started by frankthearm, Today, 09:08 AM
        5 responses
        22 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Working...
        X