[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: I'm having problem coding ApplyStops T_T



PureBytes Links

Trading Reference Links


Owen,

Sorry, too much in a hurry.  Keep in mind my comment in the original
post.  It follows below in double quotes.

""It is used with EOD systems which trade next day on an onstop 
order. Watch out for errors as some changes made and not tested.""

All Buy/Sell conditions would need to take this form:  Ref(XYZ,-1)

The following should precede the Buy = ... statement.
Long_Buy_Price = Your_Definition;

The second Long_Buy_Price = Your_Definition; should be changed to
Long_Sell_Price = Your_Definition; and should also precede the 
Sell = ... statement.

With the above changes, I think you can see that we are trading 
today, based on yesterday's EOD data; but, that was not the point of
the post.  I was trying to help out with ways to visualize the
ApplyStop concept.


--- In amibroker@xxxxxxxxxxxxxxx, Owen Davies <owen5819@xxxx> wrote:
> among other comments, aew_o wrote:
> 
> >Buy = Your_Buy_Condition;
> >Long_Buy_Price = Your_Definition;   				
> >BuyPrice = Ref(Long_Buy_Price,-1);		
> >Sell = Your_Sell_Conditions;
> >Long_Buy_Price = Your_Definition;
> >SellPrice = Ref(Long_Sell_Price,-1);
> >
> I don't quite understand what is going on here.  You are buying or 
> selling on the current bar but giving yourself credit for the price 
you 
> would have gotten by buying or selling on the previous bar?  Why 
not 
> BuyPrice = Long_Buy_Price; and SellPrice = Long_Sell_Price;?
> 
> Owen Davies





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/