Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Referenceproblem for Stop Orders

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

    Referenceproblem for Stop Orders

    Hello,

    i have a problem referencing to the correct bars for placing my stop order.

    Once i am in a position, in this case LONG, i like to place a stop order below the lowest low of the first 3 candles of the day.

    I gave it a try with MIN(Low,3)[0] but then it takes the lowest low of the 3 candles before the current entry. Since the entry is allways on a different counted candle, i can not change the [0] value to another because the reference would be still wrong.

    Question: Is it possible to tell Ninjatrader, that it should take the lowest low of the first 3 Candles since the session started as stop value ?

    thank you for your support
    NT2010

    #2
    nt2010, this is possible, but you would need to custom code the 'finding' of your stop value then for the day. You can just use a variable reset at the session break to keep track of the it.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hello Bertrand,

      thank you for your fast reply. It would be great if you could give me a link to a section where i can find some explanation with a code sample. Thank you for your support !

      NT2010

      Comment


        #4
        Unfortunately I would not have sample available for this task, it's just basic programming with a variable: at the session break you save the current value of the Low of the price bar, on the next 3 bars you check if the current Low is lower than the saved value in your variable, if yes you update the reference value, if not you hold on to the previously saved value.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by jpapa, Today, 07:22 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by kevinenergy, 02-17-2023, 12:42 PM
        116 responses
        2,758 views
        1 like
        Last Post kevinenergy  
        Started by franatas, 12-04-2023, 03:43 AM
        7 responses
        106 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Jltarrau, Today, 05:57 AM
        3 responses
        9 views
        0 likes
        Last Post Jltarrau  
        Started by f.saeidi, Today, 05:56 AM
        2 responses
        9 views
        0 likes
        Last Post NinjaTrader_Erick  
        Working...
        X