PureBytes Links
Trading Reference Links
|
Rod,
When a buy condition is hit, you can set a flag that will force
Tradestation to execute a buy order if at anytime after setting the flag,
the entry price is hit. The code would look something like this:
If Buy condition is met and flag = 0 then
Buy 1 at 1150 limit 'attempt to buy at the next bar
Flag = 1
End if
If flag = 1 then buy at 1150.00 limit. 'reset the order for each
successive bar...
If Buy condition is Met or Cancelled then '...until it is met or the
conditions for placing it no longer exist
Flag = 0
End if
You can check to see if TS executed the trade using the position-info
related functions (ie CurrentContracts) to the trade to determine if the
buy condition was met.
Good Luck,
Brian
-----Original Message-----
From: rod wheeler [SMTP:qtp@xxxxxxxxxxxx]
Sent: Tuesday, July 07, 1998 2:18 PM
To: omega-list@xxxxxxxxxx
Subject: EL Help Please
TS 4.0 Build 19.6
Market: S&P future
Compression: 1 Minute
I have a set of conditions which generate a buy signal at a specific price.
The way the system is written ie: to buy at a specific price, is only valid
in TS for the next bar after which the order seems to be cancelled.
As an example:
The system generates a buy order at 1150.00 on the close of a bar.
The next bar doesn't get to 1150.00 so the order isn't filled.
The next bar goes through 1150.00 but no entry is indicated.
I would like the code to leave the order price in the market until it is
hit.
Any help or direction would be greatly appreciated. TIA
Rod Wheeler
|