• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

If Strategy has No Exits built in how does strategy Know when is it flat

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

    If Strategy has No Exits built in how does strategy Know when is it flat

    If Strategy has No Exits built in how does strategy Know when is it flat

    Building Strategy to Enter Positions Only. I wish to manage exits with manual input. How will the strategy know when the position no longer exsist so that it might enter another position

    #2
    Hello DTSSTS,

    Thanks for your post.

    If the strategy has no exits, including exit on session, then it (the strategy) would never be flat once its entry order is filled.

    Strategies are intended to be run automatically without user interaction. For example, if a strategy has a long position and you manually place a short position on the same instrument and same account the account position would then be flat however the strategy position would continue to be long until the strategy itself closes the long position. You can test this yourself by creating a strategy that only places 1 order and does not have exit on session close set and Print the value of Position.MarketPosition. Once the entry order is filled you would see the output window showing the strategy position. If you then manually place an opposite order, once it fills the strategy position will continue to be as it was but the account position will be flat.

    While strategies are intended to run without manual interactions you can create a strategy that does work with ATMs which does allow you to then directly manipulate the ATM profit/stops as you wish and the strategy will remain in sync with the account position. This type of strategy uses special ninjascript method/properties but does not work with strategy builder type strategies. In your Ninjatrader is the strategy SampleAtmStrategy that is well documented in its code and demonstrates the usage. The strategy will find/place a long entry and then control is turned over to the ATM for the stop/profit targets. Once the profit or stop are filled, the strategy then finds and places the next order. Here is a link to the strategy ATM methods in the help guide: https://ninjatrader.com/support/help...gy_methods.htm

    If you would like a strategy like that created for you, using your entry criteria, we can provide link(s) to 3rd party programmers who can provide that coding service.


    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by danitralla, Yesterday, 03:33 AM
    1 response
    20 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by ninjo, Yesterday, 11:54 AM
    0 responses
    6 views
    0 likes
    Last Post ninjo
    by ninjo
     
    Started by deblanka, Yesterday, 08:56 AM
    0 responses
    13 views
    0 likes
    Last Post deblanka  
    Started by Boonfly8, 03-22-2019, 12:30 PM
    7 responses
    26 views
    0 likes
    Last Post sledge
    by sledge
     
    Started by Sohal, Yesterday, 05:02 AM
    2 responses
    23 views
    0 likes
    Last Post techmint  
    Working...
    X