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

Re: Tj: Buy delays in settings



PureBytes Links

Trading Reference Links

Anthony and Tomasz:

If you use your buy formula as you suggested, which buys the day 
after the buy condition is true, then I think you have to define your 
BuyPrice as the open on the day of the buy. In other words, now the 
buyprice code would be 
BuyPrice=ValueWhen(buy,Open); 
rather than
BuyPrice=ValueWhen(ref(buy,-1), Open); 
otherwise the buyprice will be delayed yet another day. Is this 
right? 

Al V.

--- In amibroker@xxxx, Anthony Faragasso <ajf1111@xxxx> wrote:
> Tomasz,
> 
> Example:
> 
> buycond="my forumla";
> buy=ref(buycond,-1);
> 
> Ok, so in the above example: if I have Settings in AA of : 
Delay=1 and
> in my code formula I have Buy=ref(buycond,-1), then my actual buy 
delay
> will be***** 2 days.******
> 
> /********************
> Is there any way that the Hard code can override this system 
setting ?
> or is this a difficult chore to accompolish.
> 
> So, in reality hard Coding does not overRide this system setting. 
What
> you are saying is that we should set Delay =0, and then hard code 
our
> delay.
> 
> 
> As for part two, yes I meant BuyPrice. Thank you for the 
observation.
> 
> Please respond to the first part for clearer understanding.
> 
> Best Wishes
> Anthony
> 
> 
> Tomasz Janeczko wrote:
> 
> > Anthony,
> >
> > If you set delay in the Settings and additionally you shift 
signals
> > in the code - the delays will ADD.
> >
> > But...
> > buy = valuewhen( ref( buy, -1 ), open );
> >
> > statement is wrong. I think you wanted to say:
> > buyprice = valuewhen( ref( buy, -1 ), open );
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message -----
> > From: "Anthony Faragasso" <ajf1111@xxxx>
> > To: <amibroker@xxxx>
> > Sent: Saturday, April 20, 2002 4:11 AM
> > Subject: [amibroker] Tj: Buy delays in settings
> >
> >
> > > Tomasz,
> > >
> > > If in settings in AA I have Buy=close, delay=2, and write code 
in
> > my
> > > formula that says,
> > > buy=valuewhen(ref(buy,-1),open);
> > > which one takes precendence over the other.. It should be the 
hard
> > code
> > > in my formula , is this correct.?
> > >
> > > Anthony
> > >
> > >
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
> >
> >
> > Yahoo! Groups Sponsor
> ADVERTISEMENT
> [Image]
> 
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.