View Full Version : Profit Stop
CanAm
21st October 2003, 02:10 PM
Hi David
Trying out the Profit stop feature, ie; ExtFml( "TradeSim.SetProfitStop", 5);
Q - Does this actually exit the stock at this price?
Reason - I get numerous msgs in the error log stating the days low is lower than the proposed exit price.
Q - How do I compensate for this, ie; build it into my "ExitPrice" when I can't recall the original "EntryPrice" as its not a 'constant' value that can be recovered?
Q - Are the errors caused because I am looking at intraday trading? (ie; if the "EntryPrice" + 5% is not eqivilant to my normal exit price then can it not cope with the trade?
I have tried making the "Threshold point" lower and lower but it just causes more errors so I am assuming it is because of what I said at Q3??
Cheers
Seth
:)
David Samborsky
22nd October 2003, 12:27 AM
Trying out the Profit stop feature, ie; ExtFml( "TradeSim.SetProfitStop", 5);
Q - Does this actually exit the stock at this price?
Reason - I get numerous msgs in the error log stating the days low is lower than the proposed exit price.
It exits when the ExitPrice exceeds the Entryprice by 5% or more.
ie when ExitPrice > 1.05*EntryPrice
Q - How do I compensate for this, ie; build it into my "ExitPrice" when I can't recall the original "EntryPrice" as its not a 'constant' value that can be recovered?
A snapshot of the EntryPrice is taken when your EntryTrigger is asserted so you don't have to worry about it varying from bar to bar.
Q - Are the errors caused because I am looking at intraday trading? (ie; if the "EntryPrice" + 5% is not eqivilant to my normal exit price then can it not cope with the trade?
All TradeSim functions are not designed to work with intraday data which may explain the errors.
CanAm
22nd October 2003, 02:06 PM
Hi David
Thanks for the reply.
I may not have been entirely clear on my questions.
When you say "It exits when the ExitPrice (XP) exceeds the Entryprice (EP) by 5% or more. " do you mean that it exits at EntryPrice*1.05, or, does it rely on the definition you code as "exitprice" to apply that price?
IE; say I had a trailing stop of 1.5ATR from the high, AND, I used the profit stop code. Lets assume the TS was at 1.00, the PS was 1.25 and the days trading ranged between 1.20-1.30. The PS would trigger I'd assume, but, because my XP was coded as 1.00 then would the trade be rejected and added to the error log?
Would I need to say XP is either the TS or the PS? If so, how do I do the latter (PS) when EP is an everchanging value (see coment below).
Q2 - When yo usay a snapshot is taken of the EP, I assume that is only within the confines of TradeSim functions? Lets assume EP is equal to the open of the trading day following the entry criteria is true. Anytime I have tried to use EP for something like EP+2atr the EP will change to the open of each day of the trade.
I think I posted something previously in relation to Q2 in regards to being able to store 'global' values that you may want to call on later, hint wink :)
Cheers
Seth
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.