PureBytes Links
Trading Reference Links
|
Add a marker to track your position:
Var: tracker(-1);
If condition to buy is true and tracker = -1 then begin
buy at market;
tracker = 1;
end;
If condition to sell is true and tracker = 1 then begin
sell at market;
tracker = -1;
end;
Hence:
- the first trade will be a long one
- the next trade will be a short one, whether you were still long or stopped
out before
- the next trade will be a long one, even if you were stopped out from the
short and a new short condition materialized (the code would reject a new short
as tracker is already = -1)
Hope this works for you,
Gwenn
| -----Ursprungliche Nachricht-----
| Von: NM [SMTP:splu@xxxxxxxx]
| Gesendet am: Monday, August 16, 1999 11:58 PM
| An: omega-list@xxxxxxxxxx; code-list@xxxxxxxxxxxxx; realtraders@xxxxxxxxxxxx
| Betreff: EL Programing Question
|
| can anyone help me with some EL code.
| I am trying to program an Intraday system that has multiple entry signals,
| however once a long signal is hit the other long entry should be ignored
| even if the first signal stoped out.
| Problem I have is when the system exits the first Long Entry on a profit it
| will initiate the 2nd Long entry signal.
| Thanks in advance
|
| Mark
|