Bit of a complicated one here.
I have built this tool for someone and it works great most of the time, It is made to submit ATM orders when a stopmarket order is rejected. So it is subscribed to the accounts OnOrderUpdate and when it detects a rejected stop it will execute a Market ATM in the direction of the stop.
I am not able to replicate this on my machine but for some reason the ATMs that are being submitted after a rejection will start to set their stoploss 2 ticks away. This causes some more rejected stops and a flurry of action (Understandable because the script is meant to detect rejected stops) but still for some reason during that flurry it is placing the ATM stoploss 2 ticks away.
I am having it detect the ATM that is selected in the Chart Trader (It is subscribed to OnATMSelectionChange and will just update when it is changed) and the ATMStrategy is saved into an ATMStrategy object so there should be no confusion. Let me know if this makes sense. I cannot recreate on my machine so it makes things difficult. They are using Rithmic which I know can cause problems but the execution of the ATM I wouldn't think the connection would matter.
Thanks!
Can email log and trace if needed. They are too big to attach

Comment