Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

In Strategy Builder : Store daily PnL in a custom serie and trade on a 1 minute chart

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

    In Strategy Builder : Store daily PnL in a custom serie and trade on a 1 minute chart

    Hi,
    I am developping a strategy in Strategy Builder that trades the NQ on a 1 minute chart. For other purpose, I have to store the Balance at the end of the day. Every thing is ok except that my custom serie is on a 1 minute timeframe but i have to store the balance at the end of the day on a "daily" basis
    Thank you for your help

    #2
    Hello rht5692,

    It is necessary to use a custom Series to perform some arithmetic to calculate the day's PnL.

    Below is a link to an example named DailyLossLimitBuilderExample_NT8.
    https://ninjatrader.com/support/foru...ples#post93881
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      ok thank you i have red this example but i did not understand how to store the daily pnl in a custom serie (i have to calculate the sma of the daily pnl ...)

      Comment


        #4
        Hello rht5692,

        Below is a link to a video on using the offset with Series to do math in the Strategy Builder.


        The YesterdaysPNL series on each bar is set to the previous bar's value to carry the value forward (while still being able to use offsets for math).
        The StrategyTotallPNL on each bar is set to Strategy -> Realized PnL.
        On the first bar of a new session, YesterdaysPNL is also set to Strategy -> Realized PnL.
        On all other bars that are not the first bar of the session, the DailyPNL variable is set to the StrategyTotallPNL with the offset subtracting YesterdaysPNL.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi thank you for your help. I will create a custom data series and store on each 1 minute candle the average balance of the account calculated on the period average needed. At the end of each day, after flatten all positions, i will compute the new balance average by calculating period x balance stored on the last candle + daily pnl
          is this ok ?
          thank you for your help

          Comment


            #6
            Hello rht5692,

            You are welcome to create any script you would like with any custom logic you would like.

            The example I have provided demonstrates how to get the dailyPnL when using the strategy builder.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            50 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            126 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            69 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            42 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            46 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X