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

Strategy wizard coding question

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

    Strategy wizard coding question

    If I wanted to put into Strategy Wizard a 1 Bar trailing stop(which would be a stop and reverse) based off of the present live bar for the exit of present open position and simultaneous entry of a position in the opposite direction.

    The description is if I am in a "short position" and the present live bar breaks by one tenth of a pip the high of the previous 1 bar ago, Strategy Wizard would than immediately close the present open short position and simultaneously open a long position, with for example 20,000 units. The stop for the new long position would than be a break of any following price bar that would be the previous 1 bar ago, where the live bar breaks the low of that 1 bar ago by one tenth of a pip. And depending where price moved to this stop may be another stop and reverse 1 bar trailing stop on this long position for to close this long position and simultaneously open a short position for 30,000 units.

    The opposite of this would be if this strategy wizard was just started in a trade that was a long position

    Hope this makes sense. Thanks!

    #2
    Hello abikambic,

    Thanks for your post.

    If you want to create this yourself in the NT7 strategy wizard then to get started please review the helpguide link on the strategy wizard here: http://ninjatrader.com/support/helpG...egy_wizard.htm Make sure to follow all the links, especially to the condition builder where you will find examples of how to compare price and place orders. In addition, here is a link to a recorded session of the strategy wizard training: https://www.youtube.com/watch?v=FmBi...D7105&index=10

    In general, from your description, in the conditions builder you would test the market position to see if you are "short", you would test that the High of the current bar High[0] is greater than the previous bar Higher[1]. For the action you would then use enterlong which will close your short position and automatically put you in a long position. This would be the idea to get you started which you would need to work through and adjust as needed.

    NinjaTrader does not provide coding services. If you would like someone to code your strategy for you we can provide references to 3rd party coders.
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rajendrasubedi2023, Today, 09:50 AM
    0 responses
    2 views
    0 likes
    Last Post rajendrasubedi2023  
    Started by ender_wiggum, Today, 09:50 AM
    0 responses
    1 view
    0 likes
    Last Post ender_wiggum  
    Started by bmartz, Today, 09:30 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by geddyisodin, Today, 05:20 AM
    3 responses
    23 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by lorem, Today, 09:18 AM
    1 response
    5 views
    0 likes
    Last Post lorem
    by lorem
     
    Working...
    X