• 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

Strategy flattens trades upon start - how to prevent this

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

    Strategy flattens trades upon start - how to prevent this

    Today one of my pc's memory modules decided to die.
    As a result the machine, running NT with a strategy enabled and multiple open strategy managed trades, blue screened.

    I've managed to get the pc up and running again, so after firing up NT I've reconnected to FXCM.
    All trades from before the crash were still there on the positions tab.
    However, to my surprise, after enabling the strategy it closed all those trades...
    Is there some setting I need to configure to prevent this from happening?
    It's pretty annoying to see trades going to waste just because of hardware failure...
    What I would have liked to see is that the strategy would just pick up where it left off.

    Here's the strategy's log:

    **NT** Enabling NinjaScript strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21' : On starting a real-time strategy - StrategySync=WaitUntilFlat SyncAccountPosition=True EntryHandling=UniqueEntries EntriesPerDirection=8 StopTargetHandling=PerEntryExecution ErrorHandling=StopStrategyCancelOrdersClosePositio ns ExitOnClose=False Set order quantity by=Strategy ConnectionLossHandling=KeepRunning DisconnectDelaySeconds=10 CancelEntryOrdersOnDisable=True CancelExitOrdersOnDisable=False CalculateOnBarClose=False MaxRestarts=4 in 5 minutes
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='6000S $AUDCAD'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='5000S $AUDJPY'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='5000S $AUDNZD'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='7000S $AUDUSD'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='3000S $CADJPY'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='2000S $CHFJPY'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='3000L $EURAUD'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='5000L $EURCAD'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='5000S $EURGBP'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='4000S $EURJPY'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='4000L $EURNZD'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='4000L $EURUSD'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='3000L $GBPAUD'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='4000S $GBPJPY'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='2000L $GBPNZD'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='3000L $GBPUSD'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='5000S $NZDJPY'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='5000S $NZDUSD'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='2000S $USDCAD'
    **NT** Flattening account position on starting strategy 'D1EMA20EMA50/713e0fa648b64fdb8752b0b5b6ac7b21'. Account position='3000S $USDJPY'

    #2
    Hello,

    As you started the strategy with SyncAccount set to True, it would submit an order to your account as per the position the strategy calculates itself in at that time.

    To prevent this from happening, you can set this to "False" when starting the strategy and the position should remain open.

    I'm including a detailed video we have created on the Strategy Sync options which covers all scenarios and help you determine what settings you need to use for your strategy to operate as you're hoping:

    https://www.youtube.com/watch?v=US9c...A140D7&index=5

    We also have a few help guide articles on this topic:

    http://www.ninjatrader.com/support/h..._account_p.htm

    Syncing Account Positions:

    http://www.ninjatrader.com/support/h..._positions.htm
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by usero86, Today, 04:28 AM
    0 responses
    7 views
    0 likes
    Last Post usero86
    by usero86
     
    Started by bohenriksen, Today, 04:00 AM
    0 responses
    4 views
    0 likes
    Last Post bohenriksen  
    Started by Derjan, Today, 03:09 AM
    0 responses
    5 views
    0 likes
    Last Post Derjan
    by Derjan
     
    Started by CDXTrader, Today, 12:29 AM
    0 responses
    7 views
    0 likes
    Last Post CDXTrader  
    Started by TopGun13, Yesterday, 10:35 PM
    0 responses
    5 views
    0 likes
    Last Post TopGun13  
    Working...
    X