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

How to display the monthly performance using a strategy based on daily data

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

    How to display the monthly performance using a strategy based on daily data

    Hi All

    I would like to display the monthly performance of the SPY while the MA50days > MA200days.


    While MA50days > MA200days
    e.g. January 2016 4%
    e.g. February 2016 3.5%
    e.g. March 2016 -2.5%

    I know there is this thread, http://ninjatrader.com/support/forum...ad.php?t=43941

    Does anyone know the code for this or know how to do this in the strategy wizard? Thanks

    #2
    Hello AegisX,

    The best way I can think to accomplish this would be to build a strategy which enters on the first day of the month if the 50 is above the 200 day, and closes on the last day of the month, then reopens the next day (the first) should the 50 still be above the 200 day. This would allow you to pull the monthly performance of this strategy.

    The issue with building this strategy in the builder would be writing the logic which would close the position on the last day of the month and opening it on the first; I don’t see a way this could be built in the builder, thus the strategy would have to be written in the editor.

    Please let us know if you would like a list of third parties that could write this code for you should you not be comfortable writing in the editor.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by sidlercom80, 10-28-2023, 08:49 AM
    172 responses
    2,276 views
    0 likes
    Last Post sidlercom80  
    Started by Irukandji, Yesterday, 02:53 AM
    2 responses
    17 views
    0 likes
    Last Post Irukandji  
    Started by adeelshahzad, Today, 03:54 AM
    0 responses
    3 views
    0 likes
    Last Post adeelshahzad  
    Started by CortexZenUSA, Today, 12:53 AM
    0 responses
    3 views
    0 likes
    Last Post CortexZenUSA  
    Started by CortexZenUSA, Today, 12:46 AM
    0 responses
    1 view
    0 likes
    Last Post CortexZenUSA  
    Working...
    X