in Search

HELP-It keeps exiting next morning

Last post 08-17-2009, 23:46 by wabbit. 2 replies.
Sort Posts: Previous Next
  •  08-14-2009, 13:28 30423

    HELP-It keeps exiting next morning

    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);


  •  08-14-2009, 14:10 30424 in reply to 30423

    Re: HELP-It keeps exiting next morning

    Thanks to anyone taking a look, but I think I just figured it out!
  •  08-17-2009, 23:46 30460 in reply to 30424

    Re: HELP-It keeps exiting next morning

    If you have figured it out -- well done.

    What was the problem, others with the same problem later may read this thread and wonder what their problem is too.


    wabbit Big Smile [:D]


    "The question of whether a computer can think is no more interesting than the question of whether a submarine can swim."
    Edsgar W. Dijkstra

     

    MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC C, 11 PRO w/QC & MDK
    For custom MetaStock programming : http://www.wabbit.com.au
    My SkyPE status :
    My SkyPE account : wabbit.com.au

View as RSS news feed in XML