Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strat builder and resetting profit.

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

    Strat builder and resetting profit.

    Hello all you beautiful Ninjas I have an issue that I am hoping someone has the answer to. I am looking to throw a strategy I have through the analyzer. Currently I change the date every run so the PandL start over but would like to be able to add something in the builder that would keep track of the P&L and then reset it every day at midnight for the next day. Doing this manually is starting to try my patience. Any help would be amazing, thanks in advance.


    #2
    Hello sprks7979,

    Thank you for your post.

    Tracking the daily PnL in the Strategy Builder is tricky due to limitations on how variables are assigned. My colleague has created an example, DailyLossLimitBuilderExample_NT8 at the link below, that keeps track of the strategy's overall PnL and the PnL at the end of the previous session each in a custom series. It can then keep track of the DailyPNL variable by subtracting value of YesterdaysPNL[0] from StrategyTotalPNL[0]. Here is the link to his post which has the example attached:

    Hello, I've updated the DailyLossLimit and DailyLosLimitMultiTrade examples that were posted on the forum for NinjaTrader 7 for NinjaTrader 8. These are often requested and I felt they are good examples to have for NT8. DailyLossLimitExample_NT7 - http://ninjatrader.com/support/forum...241#post451241 (http://ninjatrader


    To view the example, follow these steps:
    • Download the DailyLossLImitBuilderExample_NT8.zip file from the link
    • Go to Control Center > Tools > Import > NinjaScript AddOn
    • Select the file you downloaded
    Once the import is successful, you may open the Strategy Builder and select this strategy from the list of available strategies and click through the builder screens to review how it is set up.

    Please let me know if I may be of further assistance.
    Emily C.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by lightsun47, Today, 03:51 PM
    0 responses
    5 views
    0 likes
    Last Post lightsun47  
    Started by 00nevest, Today, 02:27 PM
    1 response
    10 views
    0 likes
    Last Post 00nevest  
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    46 views
    0 likes
    Last Post futtrader  
    Started by Option Whisperer, Today, 09:55 AM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by port119, Today, 02:43 PM
    0 responses
    10 views
    0 likes
    Last Post port119
    by port119
     
    Working...
    X