[amibroker] Re: get atr value at tradetime

2009-08-11 Thread murthysuresh
ok. i dont get my buy signals here. i am trying to get the atr value when my actual trade happened. so in short how do i get my buy= datenum oftrade and timenum oftrade --- In amibroker@yahoogroups.com, "toddk63" wrote: > > Not sure this is what you want... > > BuyBarsSince = BarsSince(Buy ==

[amibroker] Re: get atr value at tradetime

2009-08-11 Thread toddk63
Not sure this is what you want... BuyBarsSince = BarsSince(Buy == 1); ATROpen = Ref(ATR(20),-BuyBarsSince); This keeps the ATR as it was when the trade was opened. Todd K. --- In amibroker@yahoogroups.com, "murthysuresh" wrote: > > hello > i am trying to print the atr value at print time. but

[amibroker] Re: get atr value at tradetime

2009-08-11 Thread murthysuresh
tried another variation. for some reason, i cannot get the timenum correctly as when i do a trace on tn it always returns no value. tradedatew=1090807; tradetime=145346; tn1=TimeNum(); tn=tn1<=tradetime AND (tn1 + Interval())>=tradetime; _TRACE(NumToStr(tn1)); dt=DateNum()==tradedatew; at=ATR(14);

[amibroker] Re: get atr value at tradetime

2009-08-11 Thread murthysuresh
sny helpers --- In amibroker@yahoogroups.com, "murthysuresh" wrote: > > hello > i am trying to print the atr value at print time. but for somereason, i am > getting the time out of sync > tradedatew=1090807; > tradetime=45346; > a=ValueWhen(tradedatew==DateNum() AND TimeNum()<=tradetime ,ATR(1