Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

strategy performance filter

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

    strategy performance filter

    Hi,
    I'd like to learn how to instruct an enabled strategy to take account trades only when the strategy profit performance is above an sma of profit performance (equity curve trading)
    Is there a sample strategy or specific documentation I can review?
    thanks,
    David
    Last edited by trader3000a; 10-17-2023, 07:51 AM.

    #2
    Hello trader3000a,

    You can find a sample that shows how to work with strategy performance in the following link:



    The SMA cannot be used with the strategy performance because that is not a series of data. If you wanted to use the built in SMA you would have to make a custom series<double> and assign values to that series for each bar and then pass that series to the SMA. The value you pass would depend on how you wanted the calculation to work, you would need to determine what value you set to the series for each bar.

    You can find a sample of creating a custom series here: https://ninjatrader.com/support/help...ightsub=series

    Comment


      #3
      Hi jesse,
      Thanks for your reply. I'm familiar with the SamplePnL file and how to create a custom series. I've developed my equity curve and SMA succesfully. What I'm searching for now is a way to monitor the virtual trades and take real trades only when the equity curve is above the SMA. Where could i begin looking for a reference to this type of strategy development?
      thanks,
      David

      Comment


        #4
        Hello trader3000a,

        There is not a specific sample of that concept that i could link. If you already have the SMA of your value you would need to make conditions that use that SMA to do the action that you wanted.

        The SamplePnL uses the trades that the strategy places which are not just virtual trades, those are the actual trades it placed. If you have that on a live account it would first do a historical backtest when you apply it and then place live trades. The PnL reported would include both historical and live trades that the strategy makes.

        Comment


          #5
          Hi Jesse,
          Thanks again for your reply. I'm thinking that a soltion might be to incorporate both a sim account and a real account or the backtest engine "account" into the strategy, of which the equity curve of the sim account could be monitored. The real account or backtest "account" would only take trades based on the performance parameters achieved in the sim account. Does this sound reasonably achievable within NT architecture?
          David

          Comment


            #6
            Hello trader3000a,

            Strategies can only use a single account, there would not be a way to incorporate a second account into a strategy. The trade performance, PnL values and other properties that the strategy has are only for the account that the strategy is applied to.

            Comment


              #7
              Hi Jesse,
              A poster in the forums suggested this:

              Make 2 strategies run on the same market, one on sim (always enabled), the other on live. SIM strategy can set some bool in some static class and Live strategy check it before entering a trade.

              How would i get the Live strategy to check the Sim strategy's bool?

              thanks,
              David

              Comment


                #8
                Hello trader3000a,

                Strategies are not intended to communicate with each other so I couldn't make any suggestions on doing that. If you were working with a user on that topic you could private message them for assistance on that topic.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Today, 05:17 AM
                0 responses
                52 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                130 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                70 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                44 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                48 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X