Contingent orders
Author: bgood
Creation Date: 1/20/2010 3:27 PM
profile picture

bgood

#1
I am trying to simulate a contigent order like the following: If IBM > xxx, Buy 100 shares IBM limit xxx+0.30. This kind of order can entered in ATP. I next want to place a RiskStop at entry-yyy and a profit target at entry+zzz. This is just an ATP OCO. I recognize that WLP does not process these orders yet, but I want to simulate them for back-testing purposes. Do you have any suggestions how to do this or is there any code that can do part of this task?

profile picture

Cone

#2
Of course the 100 share sizing must be specified in the Position Sizing control.

QUOTE:
If IBM > xxx, Buy 100 shares IBM limit xxx+0.30.
Even ATP would not take that limit order unless price was already above xxx+0.30. This should be entered as a stop order -

CODE:
Please log in to see this code.


QUOTE:
I recognize that WLP does not process these orders yet
Sure it does (unless there's a bug, which there could be).
profile picture

bgood

#3
Sorry that I try to over simplify my questions and make it more confusing. I will deal with my primary question.

The goal is to set a limit order to trigger if-and-only-if the stock rises above a certain price. A limit order is used because if a gap occurs, you might not want to purchase the stock because the Risk-Reward-Ratio might be bad. To accomplish this I set a contingent-order that triggers if the stock trades above my trigger price, and then place a limit-order to be sure that I do not pay too much for the stock. This combination insures my entry price is within the range of [trigger..limit]. How do I set this up in WLP so that I can backtest the method?
profile picture

Eugene

#4
Sounds like installing Community.Components and using Stop/Limit Orders is the way to go.
profile picture

bgood

#5
Hello Eugene,

I reviewed the code for the StopLimit orders, and they do not do the job. I think the code looks something like the following:

CODE:
Please log in to see this code.
profile picture

Cone

#6
QUOTE:
The goal is to set a limit order to trigger if-and-only-if the stock rises above a certain price.
For sure there no problem doing that, but there is a problem entering a limit order above the currently-traded price, which is what you implied with your original example. That isn't possible to implement because the Fidelity back-end will reject limit orders that are above the currently-traded price.

While I agree it's a useful feature, we investigated this possibility a year ago, and it would apparently require "changing all of the exchanges backend systems" which apparently cannot be done. If you want to talk to someone about it, please call Fidelity Active Trader support. If they have access to the ClearQuest database, reference FEB00095800.
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).