I have a strategy which has an OnExecutionUpdate function that gets called as soon as i add the strategy to the chart and enable it. I have a print statement that confirms it ("Execution update func hit " message below. This should not happen as i have no current entries/orders and StartBehavior=WaitUntilFlat.
The output window(see below for more details) shows an order from 3 days ago which does not appear anywhere In Control Center -> Orders or Executions tab.
I have already tried the following:
- deleting the strategy and creating a new one with the same code (which in theory should not see the orders places by another strategy)
- i reset AND repaired the db from Tools -Database management menu and restarted ninja
That stuck execution is still being printed out in my output window and i just cant remove it.
Any suggestions on how to do so ?
This is the code and logs below:
protected override void OnExecutionUpdate(Cbi.Execution execution, string executionId, double price, int quantity,
Cbi.MarketPosition marketPosition, string orderId, DateTime time)
{
Print ("Execution update func hit " + isRealTimeCondition);
//if(State != State.Realtime) {
//if(isRealTimeCondition) {
if(true) {
Print("Order Id still on " + orderId.ToString());
Print("Execution is still on " + execution.ToString());
-----------------------------------------------------
Strategy 'BKScalpAllDayAlgo/322413107': An Enter() method to submit an entry order at '03/17/2024 18:22:00' has been ignored. Please search on the term 'Internal Order Handling Rules that Reduce Unwanted Positions' in the Help Guide for detailed explanation.
Execution update func hit
Order Id still on NT-00000-26
Execution is still on execution='NT-00000-26' instrument='MNQ JUN24' account='Sim101' exchange=Default price=18100.25 quantity=1 marketPosition=Long orderId='NT-00000-26' time='2024-03-17 18:25:00' sod=False statementDate='0001-01-01'
Execution update func hit
Order Id still on NT-00001-26
Execution is still on execution='NT-00001-26' instrument='MNQ JUN24' account='Sim101' exchange=Default price=18095.25 quantity=1 marketPosition=Short orderId='NT-00001-26' time='2024-03-17 18:33:00' sod=False statementDate='0001-01-01'
Comment