Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

current day PnL stops & trading time window

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

    current day PnL stops & trading time window

    I use the wizard to create my strategies, but need help with adding code lines with the editor to include; 1) a daily realtime PnL high/low stop, and 2) trading time window (i.e. 8a-11a) without using the session manager.
    Thanks for the help.

    #2
    Hello DanW1,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    I have created a video on these items, you can view this video at the following link: http://screencast.com/t/ysAuRz40hI4

    Please let me know if you have any questions.

    Comment


      #3
      Patrick... thanks for the reply. Question, for the PnL stops in the condition builder as you demonstrated, if you enter as one separate condition of multiple market entry conditions, won't the strategy still send orders and then cancel?

      Comment


        #4
        Hello DanW1,

        Thank you for your response.

        Correct, so you could set a variable and then check for that variable on your entry conditions. For example, if the variable equals 0 then trade if not then conditions is false and the trades do not process. Please refer to the video at the following link and let me know if you have any questions: http://screencast.com/t/vwAmQepvaMvB

        Comment


          #5
          Patrick, thanks... does the Realized PnL in the condition builder reference the Realized PnL in the strategy's account or, does the strategy carry it's own PnL. The reason I ask is I notice if you disable/enable a strategy the realized PnL zeros out, as opposed to looking at the account PnL on control center's "Accounts" tab which stays cumulative for the day.

          Comment


            #6
            Hello DanW1,

            Thank you for your response.

            It will pull the strategy's PnL and not the account's.

            Comment


              #7
              So, disable/enable strategy would reset the PnL to zero?
              Thanks for your help today.

              Comment


                #8
                Hello DanW1,

                Thank you for your note.

                Disabling and re-enabling the strategy does not reset the PnL to zero in the strategy as the historical positions are still calculated as well. You can place a Historical check at the beginning of the code to ensure you only process on real-time data, but this requires unlocking the code: http://www.ninjatrader.com/support/h...historical.htm

                Comment


                  #9
                  Patrick, thanks for the info. I'm OK with unlocking the code and inserting with some programming skill. Do you have any examples or suggestions of code lines that I can insert (after creating with wizard and unlocking) to set stops for daily realtime PnL.

                  Comment


                    #10
                    Hello DanW1,

                    There is a reference sample on how to track and reset values on each new day -
                    http://www.ninjatrader.com/support/f...ad.php?t=19182
                    Cal H.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by quantismo, 04-17-2024, 05:13 PM
                    4 responses
                    30 views
                    0 likes
                    Last Post quantismo  
                    Started by love2code2trade, 04-17-2024, 01:45 PM
                    4 responses
                    31 views
                    0 likes
                    Last Post love2code2trade  
                    Started by cls71, Today, 04:45 AM
                    2 responses
                    10 views
                    0 likes
                    Last Post eDanny
                    by eDanny
                     
                    Started by proptrade13, Today, 11:06 AM
                    0 responses
                    5 views
                    0 likes
                    Last Post proptrade13  
                    Started by kulwinder73, Today, 10:31 AM
                    1 response
                    10 views
                    0 likes
                    Last Post NinjaTrader_Erick  
                    Working...
                    X