Thanks Mike - However, when I read the descriptions for APPLYSTOP, I don't see 
them fitting what I'm doing.  Assume all my buys, sells, signals...They're 
always based on mutual funds.  If signals come Monday night after getting EOD 
data, then I missed Monday's prices and will get Tuesday's Close.  So how does 
that fit:

Scenario 2: 
you trade on today's close and want to exit intraday on stop price
Correct settings: 
ActivateStopsImmediately turned OFF
ExitAtStop = 1
Trade delays set to zero
Trade price set to close

I'm not using Intraday pricing, so how will that work for EOD data?  I just 
want all stops to be based on my real purchase price, not the price when the 
signal was triggered, which would always be the day before.  Maybe I'm not 
getting it.

Thanks,

Steve.


--- In amibroker@yahoogroups.com, "Mike" <sfclimb...@...> wrote:
>
> Hi,
> 
> Since you are trading the Close, you could simplify your life by following 
> one of the well defined scenarios from the ApplyStop documentation:
> 
> http://www.amibroker.com/guide/afl/afl_view.php?id=20
> 
> In your case, follow scenario 2 and take your trades based on yesterday's 
> signal.
> 
> e.g.
> 
> SetTradeDelays(0, 0, 0, 0);
> 
> Trigger = ...;
> Buy = Ref(Trigger, -1);
> BuyPrice = Close;
> 
> Your signal still shows up Monday night. But, you don't act on it until 
> Tuesday Close. That's what you're doing in real life anyway, so just make 
> your code show the same.
> 
> Mike
> 
> --- In amibroker@yahoogroups.com, "graphman27" <steve@> wrote:
> >
> > Question:  When stops are coded afl instead of setup under settings, do 
> > they disregard the system settings for Buy Price and Buy Delay?   
> > Currently, I have the latter set to Buy Price = Close+1 Day Buy Delay.  For 
> > a new strategy I am working on, I notice that during live testing something 
> > doesn't jive.  Here is an example...
> > 
> > Note:  I always use EOD data and CLOSE +1, to get "tradable" signals for 
> > mutual funds and indices:
> > 
> > Monday Night:  Formula gave buy signal for Emerging Markets after the 
> > close.  With CLOSE+1 Day delay, that would mean buy at Tuesday's Close.
> > 
> > Tuesday Night:  Max Loss Stop is triggered because of a -3.5% drop in the 
> > Emerging Markets on Tuesday.
> > 
> > Wednesday at the close, mutual fund is sold.
> > 
> > Question:  How could a Max Loss Stop be triggered if that fund wasn't 
> > purchased until AFTER Tuesday's big drop?  Since it was purchased AFTER the 
> > drop, there was no loss of -3.5% going into Wednesday.
> > 
> > Here is an example of a typical mutual fund compatible coded stop:
> > 
> > ApplyStop(stopTypeLoss, 
> >          stopModePercent, 
> >          Optimize( "max. loss stop level", 2, 2, 10, 2 ), 
> >          False );
> > 
> > Do I have to code something else to make sure the STOP is triggered based 
> > on the CLOSE+1 purchase price and NOT the BUY SIGNAL Price?  Or, do I need 
> > to code the Buys and Sells inside the formula as CLOSE+1 instead of relying 
> > on system settings?  OR, none of the above?
> > 
> > Thanks in advance for your help, as usual!
> > 
> > Steve.
> >
>


Reply via email to