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

Re: [amibroker] Re: exploration bug or programming error???



PureBytes Links

Trading Reference Links

writeif only gives text for the last result in exploration (or
selectedbar in chart), it is not an array

you can use ASC("B") to get single letter array results, see help
files for how to use

-- 
Cheers
Graham Kav
AFL Writing Service
http://www.aflwriting.com



On 07/09/2007, Shweta Shalini <this_is_sav@xxxxxxxxx> wrote:
> Hi Joe,
>
> thnx.
>
> what problem i am facing is that while the writeif signal is coming
> wrong; for the same indicator if i output the variable value directly
> in exploration window it comes correctly. the colour change also is
> coming right for few indicators and failing for some indicators.
>
> date range shudnt create a problem i think.i have checked the same
> over 10 yrs of data and there was no error except the above error
> regd buy/sell signal of writeif.....the numerical variable output is
> correct....
>
> I was trusting the signal untill i found that it is erroneous....
>
> if u can throw sum light??
>
> rgds
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Joe Landry" <jelandry@xxx> wrote:
> >
> > I'm senior in age but not AFL skills, but regardless - your algo
> seems to work for me if I scan
> > a watchlist, like Barron's 400 or equivalent.
> > I've seen other "more" senior guys/gals use this to get the results
> of the last day no matter where you set the date range; and I get
> buys and sells on the last day for the list, and I also get buys and
> sells for a single price array.
> > HTH
> > Joe L.
> > Filter = 1 AND Status("lastbarinrange");
> >
> >
> >
> >
> >   ----- Original Message -----
> >   From: Shweta Shalini
> >   To: amibroker@xxxxxxxxxxxxxxx
> >   Sent: Friday, September 07, 2007 5:04 AM
> >   Subject: [amibroker] exploration bug or programming error???
> >
> >
> >
> >   Hi Seniors,
> >
> >   I am trying to develop an exploration using a collection of
> indicators but somehow the exploration is gving wrong signal. While
> the indicator values shows correct positive/negative values, the
> signal remains buy. Even for many indicators the colour changes to
> red/green but somehow the signal (thru writeif) gves wrong indication.
> >
> >   Anybody pls help.....since it contains too many indicators , i am
> pasting code of one of indicators using macd crossover... pls check
> my writeif for buy which is gving error.
> >
> >   PS: do we need to set the variables to null at the end so that
> the cache is not carrying over a wrong signal for the next day? but
> if it does then how come the colour of column is changing correctly?
> where is the bug?
> >
> >   //macd crossover
> >
> >   p = Param("P",12,3,36,2);
> >
> >   q = Param("Q",26,3,52,2);
> >
> >   r = Param("R",9,3,15,1);
> >
> >   EMA1= EMA(Close,p);
> >
> >   EMA2= EMA(EMA1,p);
> >
> >   Difference= EMA1 - EMA2;
> >
> >   ZeroLagEMAp= EMA1 + Difference;
> >
> >   EMA1= EMA(Close,q);
> >
> >   EMA2= EMA(EMA1,q);
> >
> >   Difference= EMA1 - EMA2;
> >
> >   ZeroLagEMAq= EMA1 + Difference;
> >
> >   ZeroLagMACD=ZeroLagEMAp - ZeroLagEMAq;
> >
> >   EMA1= EMA(ZeroLagMACD,r);
> >
> >   EMA2= EMA(EMA1,r);
> >
> >   Difference= EMA1 - EMA2;
> >
> >   ZeroLagTRIG= EMA1 + Difference;
> >
> >   //buy signal till macd is abv signal
> >
> >   spmacd_buy=zerolagmacd>zerolagtrig;
> >
> >   spmacd_val= WriteIf((zerolagmacd-
> zerolagtrig>0), "Buy", "Sell");// error...remains buy always
> >
> >   // Set the background color for Sp MACD Sgnal Status Column
> >
> >   spMACD_Col=IIf(spmacd_buy,colorGreen,colorRed);
> >
> >   Filter = 1;
> >
> >   AddTextColumn(Spmacd_val, "SpMACD", 1, colorWhite, Spmacd_Col);
> >
> >   // end
> >
> >
> >
> >   Thsnks


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/