Stop loss alert didn't get placed in Auto-Trading
Author: kazuna
Creation Date: 5/7/2009 1:24 PM
profile picture

kazuna

#1
I'm testing my strategy on paper accout and it works fine in backtesting mode.
However, when running it in the Auto-Trading mode, sometime stop loss orders didn't get placed whereas the sell sign got marked on the chart.

Do I have to do something special with the stop loss order when running in the Auto-Trading mode?

I'm wondering if this could happen when the new stop price being placed was greater or equal to the current price? Because stop sell order cannot be placed if the stop price is greater or equal to the current price in the real trading.
profile picture

Cone

#2
CODE:
Please log in to see this code.
Sure the orders were "placed" because it's all simulated. Whether or not the orders filled is another story covered in the User Guide. Long story short, in markets that hit a stop or limit trigger, but reverse quickly, the Fidelity Paper Provider is likely not to fill that order.
profile picture

kazuna

#3
Is that behavior specific to paper account or also applicable to Fidelity account?
QUOTE:
Whether or not the orders filled is another story covered in the User Guide.
I understand that but the real problem is that the strategy doesn't seem checking whether or not the stop order was actually filled but assumes it was filled and resets IsLastPositionActive to false even if the position is still active on the paper account and next another buy order will be placed.
profile picture

Cone

#4
That's exactly right. It's covered in the User Guide.

The thing to know is that this out-of-synch condition would most likely never occur with a live account, because the order would be filled by the Fidelity back end - not a paper provider checking for quotes every 30 seconds.

However, it can occur for the specific condition with limit orders described in the guide.
profile picture

kazuna

#5
QUOTE:
because the order would be filled by the Fidelity back end - not a paper provider checking for quotes every 30 seconds
I see. So paper provider doesn't provide the updated order status therefore the order is always assumed to have been filled. No workaround for this sync issue on paper account?
QUOTE:
However, it can occur for the specific condition with limit orders described in the guide.
As long as I use stop orders with live account, this problem cannot occur. Correct?
profile picture

Cone

#6
Strategies always run in theoretical mode.

No work-around.

QUOTE:
As long as I use stop orders with live account, this problem cannot occur. Correct?
Already answered that.

Kazuna, I'm going to stop`here, because I've already put all this information is in the User Guide, Orders chapter, and you're not taking the time to read it.
profile picture

kazuna

#7
Well, I didn't mean not reading the User Guide but I actually read it. However, I wasn't able to find it at the first place but I eventually found it by searching some keyword you mentioned in your post. But I rally appreciate you taking the time to answer my question.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).