I'm trying to write an exit for a specific entry without it interfering with other entries. What I came up with is tracking that entry with a variable (TOpen) but I've run into some problems.
Is there a command to specifically reference when a position has actually been opened on the chart by a specific signal?
What I have tried so far:
- normal evaluation of entry condition
Code: Select all
if TrendCount>=TrendBars and Tails>=TailCount and barstatus=0 then begin
sellshort("Tail SE") next bar market;
TailSL=maxlist(High[1],TailValues[0]);
TOpen=1;
end;
- PosTradeEntryBar
Code: Select all
if PosTradeEntryBar(0,0)=currentbar then begin
TailSL=maxlist(High[1],TailValues[0]);
TOpen=1;
end;
The solution I was thinking of was a command like PosTradeEntryBar but also referencing a specific entry.
Any way of doing this?