PureBytes Links
Trading Reference Links
|
The recent posts about inside days has prompted me to try to write a system
to trade breakouts from an inside day using daily data. I have run into
several problems.
Here is some sample code:
If InsideDay = True
then Buy next bar at High stop ;
This part works fine. However, I don't want to do the trade if the open is
a gap open higher or lower than the previous day. Is there a way to do
this???
Second is the exits:
If MarketPosition > 0
then ExitLong at EntryPrice + ProfitTarget points limit ;
This does not seem to work at all. MarketPosition and EntryPrice are
undefined. This probably has to do with the order in which TradeStation
executes the code.
Any ideas?
BTW, I am using TS4 build 21.
Thanks,
Paul Weston
|