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

best practices for turning a strategy around

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

    best practices for turning a strategy around

    I have developed a strategy but coded the long rules only. I now want to code the short rules for the strategy (which are effectively the same as the long rules, but in reverse). What is the most efficient way to execute this?

    Can I have/ would it be wise to have more than one OnBarUpdate or OnExecution method in a single strategy or do I have to create the short rules within the same OnBar and OnExe methods as the long rules?

    As always, help is much appreciated.

    Ben

    #2
    Hello,

    No, do not these additional methods you mention.
    Include everything with the same code block you have it in now, just reverse the logic etc. to meet your strategy. I suggest looking at the sample strategy code that comes with the platform to see how it works.
    DenNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cshox, Today, 11:11 AM
    2 responses
    12 views
    0 likes
    Last Post cshox
    by cshox
     
    Started by algospoke, Today, 06:53 PM
    0 responses
    3 views
    0 likes
    Last Post algospoke  
    Started by mlprice12, 12-21-2021, 04:55 PM
    3 responses
    292 views
    0 likes
    Last Post paypachaysa  
    Started by lorem, 04-25-2024, 09:18 AM
    20 responses
    85 views
    0 likes
    Last Post lorem
    by lorem
     
    Started by xepher101, 05-10-2024, 12:19 PM
    4 responses
    52 views
    0 likes
    Last Post xepher101  
    Working...
    X