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 is disabling on disconnecting of CQG data server

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

    Strategy is disabling on disconnecting of CQG data server

    Hello, I have a strategy that needs to run for a month continuously. It disables on Friday evening because CQG data server is disconnected due to their maintenance shutdown

    How do I keep my strategy enabled and continue working when data server connected comes back.

    Following is from the message logs where my strategy running on all 4 indexes are being disabled.

    Can I use any other data provider (instead of CQG) that may not create this issue ?

    Thanks

    Rtel
    /16/2021 12:06 Connection 2 LiveData: Primary connection=Connecting, Price feed=Connecting
    8/13/2021 23:42 Default Disabling NinjaScript strategy 'RVTrader/239369596'
    8/13/2021 23:42 Default Disabling NinjaScript strategy 'RTrader/239369594'
    8/13/2021 23:42 Default Disabling NinjaScript strategy 'RTrader/239369593'
    8/13/2021 23:42 Default Disabling NinjaScript strategy 'RTrader/239369595'
    8/13/2021 23:42 Connection 2 LiveData: Primary connection=Disconnected, Price feed=Disconnected
    8/13/2021 23:42 Connection 2 LiveData: Your session is about to close. (Panic)
    8/13/2021 23:42 Connection 2 LiveData: Primary connection=Disconnecting, Price feed=Disconnecting
    8/13/2021 23:42 Connection 2 LiveData: Primary connection=Connection lost, Price feed=Connected

    #2
    Hello RtelTrade,

    Thanks for your post.

    Every broker will have maintenance time. This is regularly done on weekends and requires us to reconnect and re-enable strategies at least every week.

    You may be able to reconnect programmatically using Connect() that is triggered from an AddOn that checks the PC clock time (DateTime.Now), but there would not be any supported way to programmatically enable a strategy.

    Something unsupported you could consider would be to adapt your strategy logic in an indicator and use AddOn Framework code to submit orders using Account.CreateOrder and Account.Submit. Keep in mind, this would drop the safe guards built into NinjaScript strategies, for example, when an order is rejected, the strategy will automatically disable and attempt to close positions and cancel orders.

    Using an indicator and AddOn Framework code to drive the order submissions would also be different because there is no internal strategy position that would get calculated from historical processing.

    Connect - https://ninjatrader.com/support/help...t8/connect.htm

    Account class - https://ninjatrader.com/support/help...ount_class.htm

    From a supported perspective, the path forward is to re-enable the strategy at least weekly, and use the ImmediatelySubmit Start Behavior to have the strategy resume from the position and orders it calculates as being active from historical processing.

    Syncing Account Positions - https://ninjatrader.com/support/help..._positions.htm

    We look forward to assisting.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    11 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    16 views
    0 likes
    Last Post AaronKoRn  
    Working...
    X