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:

    Download NinjaTrader FREE at http://www.ninjatrader.comThis video demonstrates the differences between Strategy positions and Account positions and how to sy...


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



    Syncing Account Positions:

    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by haas88, 03-21-2024, 02:22 AM
    18 responses
    208 views
    0 likes
    Last Post haas88
    by haas88
     
    Started by Board game geek, Today, 02:20 AM
    0 responses
    1 view
    0 likes
    Last Post Board game geek  
    Started by knighty6508, Today, 01:20 AM
    2 responses
    14 views
    0 likes
    Last Post knighty6508  
    Started by franatas, Today, 01:53 AM
    0 responses
    2 views
    0 likes
    Last Post franatas  
    Started by knighty6508, Today, 01:17 AM
    0 responses
    9 views
    0 likes
    Last Post knighty6508  
    Working...
    X