Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 7/26/2009(UTC) Posts: 7
|
My system keeps exiting the trade on the open the day after I enter the trade and I can't figure out why. I thought it had to do with the exitprice or the chandelier stop so I made some changes there but I'm still getting the same result. Would somebody mind taking a look for me? Thanks, Darren
Period:=10;
ARC:=2.5;
Volatility:=ARC*ATR(Period);
bsig:=(C-Ref(C,-60))/ATR(60)>=12 AND
C>Mov(C,200,S) AND C>Mov(C,50,S) AND C>Mov(C,20,S) AND
Security("Online:.SPX",C) >
Security("Online:.SPX",Mov(C,200,S));
EntryPrice:=OPEN;
{ExitLong:=-ExtFml("TradeSim.TrailingStop",
TRIGGER,
LONG,
Volatility,
CLOSE,
LOW);}
initstop:=(EntryPrice-2.5*ATR(10));
cstop:=H-(2.5*ATR(10));
trade:=If(PREV<=0,If(bsig,initstop,0),
If(L<PREV,-1,Max(cstop,PREV)));
trade=-1;
ExitPrice:= OPEN;
ExtFml("TradeSim.Initialize");
ExtFml("TradeSim.EnableProtectiveStop",1);
ExtFml("TradeSim.EnableDelayOfEntryByOneBar");
ExtFml("TradeSim.EnableDelayOfAllExitsByOneBar");
ExtFml("TradeSim.ShowTrades",LONG,"AAPL");
ExtFml("TradeSim.RecordTrades",
"My Trend Test",
LONG,
bsig,
EntryPrice,
initstop,
cstop,
ExitPrice,
START);
|