how do you document strategy and rules

Discussion in 'Strategy Building' started by junkone, Apr 26, 2022.

  1. junkone

    junkone

    i have build a few strategies in ninjatrader. i realize that i dont have a visual flow for the strategy and when i change it, i am scrambling how i put it in first place.
    how does one document the strategy and rules. its easy to build it but hard to remember when i maintain it.
     
  2. maxinger

    maxinger

    I classify the chart patterns/strategies into various categories and I save those charts on my computer.
    And I label those patterns/strategies using some keywords.

    I'd go through those charts as and when necessary to refresh my memory.
    This helps me in my visuals.
     
    easymon1 and junkone like this.
  3. ph1l

    ph1l

    Add detailed comments in the code to help you recall the logic later.
    https://ninjatrader.com/support/hel...glish.html?debugging_your_ninjascript_cod.htm
    upload_2022-4-26_22-13-43.png
    upload_2022-4-26_22-14-20.png
     
    guest_trader_1 and easymon1 like this.
  4. TheDawn

    TheDawn

    I use if-then-else statements to document my strategy for each scenario that could be encountered in my trading.
     
    easymon1 likes this.
  5. Trader Curt

    Trader Curt

    Your strategy should be to not have a strategy. That should be your strategy
     
    Leob likes this.
  6. deaddog

    deaddog

    Build a checklist.
    Go thru the list and make sure every item is checked off.
     
    TheDawn likes this.
  7. easymon1

    easymon1

    Last edited: Apr 27, 2022
  8. Following what has been said already, you can use code comments and then generate your documentation out of it. If you are using c# (it seems to be the language for ninja trader) you can use doc generators like:

    https://dotnet.github.io/docfx/

    This idea comes from javadoc, the standard documentation generation tool for java.

    If you want any alternative for another language you can search for 'javadoc alternatives' and you will get the one for the language that you are using.
     
    TheDawn likes this.
  9. You are more stupid than I thought
     
  10. Trader Curt

    Trader Curt

    That's not very nice. And why is that?
     
    #10     Apr 27, 2022