--- In [email protected], "Howard B" <[EMAIL PROTECTED]> wrote:
Hi Thanks for your suggestion and response. I have tried it without "if" statement in exploration scan. I'm getting results. But the problem is the exploration screen is full of addcolumn() lists. That's why i'm trying it another way by using "if" statement. I have removed the alert condition and at present i'm using the exploration without "if" statement. Any how i'm reading user guide of amibroker. But i'm not sure 'am acheiving it or not because i don't have much idea about this if-else-loop-boolean....bla bla bla. Ajay > > Hi -- > > One problem is that you are overwriting two of your variables -- alert and > confirm. > > The other may be the complexity of the "if" statement. Check the > documentation on AddColumn in the AmiBroker Help and try a simpler example. > > Howard > > > On 7/22/07, tummalaajaybabu <[EMAIL PROTECTED]> wrote: > > > > Hi > > > > I have this idea to use this code in exploration with the help of if > > option. With each if function i have put a addcolumn statement. May be > > that is not correct one so, i'm getting syntax error. Can anybody help > > me to correct this formula. Is this correct or any fine tuning > > suggestions from your side. > > > > very much thank you.... > > > > Ajay > > ================ > > > > alert = MACD() > Ref(MACD(), -1); > > Buy = MACD() > Signal(); > > Confirm = MACD() > 0; > > > > alert = MACD() < Ref(MACD(), -1); > > Sell = MACD() < Signal(); > > Confirm = MACD() < 0; > > > > Filter = C; > > > > if (MACD() > Ref(MACD(), -1) > > AddColumn( 32, "alert", formatChar, colorDefault, > > IIf(Filter && alert,colorPaleGreen,colorDefault) ); > > else > > if (MACD() > Signal()) > > AddColumn( 32, "check 1hr. & buy", formatChar, colorDefault, > > IIf(Filter && Buy,colorGreen,colorDefault) ); > > else > > if (MACD() > 0) > > AddColumn( 32, "confirm", formatChar, colorDefault, > > IIf(Filter && confirm,colorDarkGreen,colorDefault) ); > > else > > if (MACD() < Ref(MACD(), -1) > > AddColumn( 32, "alert", formatChar, colorDefault, > > IIf(Filter && alert,colorLightOrange,colorDefault) ); > > else > > if (MACD() < Signal()) > > AddColumn( 32, "check 1 hr & sell", formatChar, colorDefault, > > IIf(Filter && Sell,colorDarkRed,colorDefault) ); > > else > > if (MACD() < 0); > > AddColumn( 32, "confirm", formatChar, colorDefault, > > IIf(Filter && confirm,colorDarkRed,colorDefault) ); > > > > //end > > > > > > >
