MicroTrendsLtd / NinjaTrader8

NinjaTrader8 Components Strategies and Trading tools
MIT License
72 stars 17 forks source link

Position 3 - yet 4 sent to close #23

Closed MicroTrendsTom closed 3 years ago

MicroTrendsTom commented 3 years ago

Maybe this the limit close issue you mentioned ..

Looks like market position was 3 short. Even though position was 3 short, submitted close order quantity of 4 ... leaving one open long position uncovered. image

MicroTrendsTom commented 3 years ago

@jmscraig reported it as a bug for you so we can work through it from a triage POV.

The background to this area is here https://github.com/MicroTrendsLtd/NinjaTrader8/issues/22#issue-759052875

We would hope any imbalance on the close position would be handled and caught in the post fill check etc -but we dont have the full gamut implemented as yet. So that is the questions are

1) what happened after the position was there and was it caught and reject or was the exit stop loss not in balance etc?
2) What settings, was the the monitor were in action and was the flow set to error reject 3) What is in the actual in depth tracing from trace file to follow the events etc 4) what timeseries for the test used in order to replicate etc

One thing we do know is the strategy is using a static exit technique based on the entry fill so it will not adapt So if the system does manage to miss the quantity update there could be the incorrect balance... active -unguarded until next close etc

MicroTrendsTom commented 3 years ago

Have implemented Limit order exit... initial version - needs testing... no doubt to polish https://github.com/MicroTrendsLtd/NinjaTrader8/issues/22#issue-759052875

Testing on a 3 second chart - we do see some anomalies and "Resets"

MicroTrendsTom commented 3 years ago

are we confident this is now taken care of by the settings and flow or is this a 1 in 1000,000 event that gets through and we need post trade checking to cure it?

MicroTrendsTom commented 3 years ago

to me this is ok as the WF will catch -and later the additional backlog items will resolve so will clear the view and close as the cure for all is in backlog #31