PureBytes Links
Trading Reference Links
|
Dimitris,
I am working with you idea on this scan "<FONT
face="Courier New"
size=3>IIf(S1,a1,(IIf(S2,a2,IIf(S3,a3,IIf(S4,a4,..."
<FONT face="Courier New"
size=3>
What does S1, S2,
S3.....stand for or mean??
When Irun this out
I get a error message
<FONT face="Courier New"
size=3>
Unknown identifier at line 48, column
7:
IIf(S1,------^
IIf(S1,a1,(<FONT color=#0000ff
size=1>IIf(S2,a2,(<FONT color=#0000ff
size=1>IIf(S3,a3,(<FONT color=#0000ff
size=1>IIf(S4,a4,(<FONT color=#0000ff
size=1>IIf(S5,A5,(<FONT color=#0000ff
size=1>IIf(S6,A6,(<FONT color=#0000ff
size=1>IIf(S7,A7,(<FONT color=#0000ff
size=1>IIf(S8,A8,(<FONT color=#0000ff
size=1>IIf(S9,A9,(<FONT color=#0000ff
size=1>IIf(S10,A10,(<FONT color=#0000ff
size=1>IIf(S11,A11,(<FONT color=#0000ff
size=1>IIf(S12,A12,(<FONT color=#0000ff
size=1>IIf(S13,A13,(<FONT color=#0000ff
size=1>IIf(S14,A14,(<FONT color=#0000ff
size=1>IIf(S15,A15,(<FONT color=#0000ff
size=1>IIf(S16,A16,(<FONT color=#0000ff
size=1>IIf(S17,a17,(<FONT color=#0000ff
size=1>IIf(S18,A18,(<FONT color=#0000ff
size=1>IIf(S19,A19,(<FONT color=#0000ff
size=1>IIf(S20,A20,(<FONT color=#0000ff
size=1>IIf(S21,a21,(<FONT color=#0000ff
size=1>IIf(S22,a22,(<FONT color=#0000ff
size=1>IIf(S23,a23,(<FONT color=#0000ff
size=1>IIf(S24,a24,(<FONT color=#0000ff
size=1>IIf(S25,A25,(<FONT color=#0000ff
size=1>IIf(S26,a26,(<FONT color=#0000ff
size=1>IIf(S27,A27,(<FONT color=#0000ff
size=1>IIf(S28,A28,(<FONT color=#0000ff
size=1>IIf(S29,A29,(<FONT color=#0000ff
size=1>IIf(S30,A30,(<FONT color=#0000ff
size=1>IIf(S31,A31,(<FONT color=#0000ff
size=1>IIf(S32,A32,(<FONT color=#0000ff
size=1>IIf(S33,A33,(<FONT color=#0000ff
size=1>IIf(S34,A34,(<FONT color=#0000ff
size=1>IIf(S35,A35,(<FONT color=#0000ff
size=1>IIf(S36,A36,(<FONT color=#0000ff
size=1>IIf(S37,A37,(<FONT color=#0000ff
size=1>IIf(S38,A38,(<FONT color=#0000ff
size=1>IIf(S39,A39,(<FONT color=#0000ff
size=1>IIf(S40,A40,(<FONT color=#0000ff
size=1>IIf(S41,A41,(<FONT color=#0000ff
size=1>IIf(S42,A42,(<FONT color=#0000ff
size=1>IIf(S43,A43,(<FONT color=#0000ff
size=1>IIf<FONT
size=1>(S44,A44)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
Cheers,
Brian
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
dtsokakis
To: <A title=amibroker@xxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Saturday, July 06, 2002 1:51
AM
Subject: [amibroker] Re: AFL Help
Anthony,I see many multiple iif statements in various
codes you post and I would like to notice something:A multiple iif
statement will be valid when each condition EXCLUDES the rest, else there
will bea confusion.For example Day10<Day6 does exclude
Day10>Day6 but does not exclude Day9>Day5 or Day9<Day5,
consequently the statementIIf( Day10 < Day6, 5, IIf( Day10 >Day6,
8, IIf( Day9 < Day5, 5,...leads to confusion.It is easy to
find candles with Day5<Day1 coloured with #8 and not with #5, as
written in yourIIf( Day5 < Day1, 5, IIf( Day5 >Day1,
8,5));because some previous statement, perhaps Day14>Day10, is true,
paints the candle with #8 and does not leave room for other
possibilities.On the other side, in your code you simply ask #5 when C
5 bars ago is > than C 1 bar ago and #8 when not, no matter if it is
bar 10 or bar 20 etc.This would be written easier
asA1=Ref(C,-5)<Ref(C,-1);A2=Ref(C,-5)>Ref(C,-1);barcolor=A1*5+A2*8;For
a correct multiple iif
statementIIf(S1,a1,(IIf(S2,a2,IIf(S3,a3,IIf(S4,a4,...condition S2
should be excluded by S1, condition S3 should be excluded by S1 and
S2,condition S4 should be excluded by S1 and S2 and S3 and so on.I
hope this hepls to avoid the multiple iif headaches .Dimitris
Tsokakis--- In amibroker@xxxx, Anthony Faragasso
<ajf1111@xxxx> wrote:> Hello Brian,> > I have not
read the article, so I am not up to what it is you are trying>to
achieve, but here is a formula, load into Indicator builder.> >
Day1 = Ref( C, -1 );> Day2 = Ref( C, -2 );> Day3 = Ref( C, -3
);> Day4 = Ref( C, -4 );> Day5 = Ref( C, -5 );> Day6 =
Ref( C, -6 );> Day7 = Ref( C, -7 );> Day8 = Ref( C, -8
);> Day9 = Ref( C, -9 );> Day10 = Ref( C, -10 );> Day11 =
Ref( C, -11 );> Day12 = Ref( C, -12 );> Day13 = Ref( C,-13
);> Day14 = Ref( C, -14 );> Day15 = Ref( C, -15 );> Day16
= Ref( C, -16 );> Day17 = Ref( C, -17 );> Day18 = Ref( C, -18
);> Day19 = Ref( C, -19 );> Day20 = Ref( C, -20 );> Day21
= Ref( C, -21 );> Day22 = Ref( C, -22 );> > >
> barcolor = IIf( Day22 < Day18, 5, IIf( Day22 >Day18, 8, IIf(
Day21 <> Day17, 5, IIf( Day21 >Day17, 8, IIf( Day20 < Day16,
5, IIf( Day20> >Day16, 8, IIf( Day19 < Day15, 5, IIf( Day19
>Day15, 8,IIf( Day17 <> Day14, 5, IIf( Day18 >Day14, 8, IIf(
Day16 < Day13, 5, IIf( Day17> >Day13, 8, IIf( Day16 <
Day12, 5, IIf( Day16 >Day12, 8, IIf( Day15 <> Day11, 5, IIf(
Day15 >Day11, 8, IIf( Day14 < Day10, 5, IIf( Day14>
>Day10, 8, IIf( Day13 < Day9, 5, IIf( Day13 >Day9, 8, IIf(
Day12 <> Day8, 5, IIf( Day12 >Day8, 8, IIf( Day11 <
Day7, 5, IIf( Day11 >Day7,> 8, IIf( Day10 < Day6, 5, IIf(
Day10 >Day6, 8, IIf( Day9 < Day5, 5, IIf(> Day9
>Day5, 8, IIf( Day8 < Day5, 5, IIf( Day8 >Day4, 8, IIf(
Day7 <> Day3, 5, IIf( Day7 >Day3, 8, IIf( Day6 <
Day2, 5, IIf( Day6 >Day2, 8,> IIf( Day5 < Day1, 5, IIf( Day5
>Day1, 8,> 5))))))))))))))))))))))))))))))))))));> >
> /* Colourized price bars drawn here */> //Graph0BarColor =
barcolor;> Graph0Style = 64; // Bar Graph> Graph0BarColor=
barcolor;> Graph0 = C;> > Anthony> >
brian_35m wrote:> > > I was trying to create a formula
that used the principles in the> > following article.>
>> > <A
href="">http://www.activetradermag.com/glass.htm>
>> > I put this in indicator builder. It has a couple errorsthat
I cant> > seem to fix. When it changes from one pattern and
begins another I> > was trying to get it to change color but I was
unsuccessful (examples> > are in Figure 1 & 2 in the
article). Also, is it possible to get> > numbers to post on the
bars?> >> > Thanks,> > Brian>
>> > Day1 = Ref( C, -1 );> > Day2 = Ref( C, -2
);> > Day3 = Ref( C, -3 );> > Day4 = Ref( C, -4 );>
> Day5 = Ref( C, -5 );> > Day6 = Ref( C, -6 );> > Day7
= Ref( C, -7 );> > Day8 = Ref( C, -8 );> > Day9 = Ref( C,
-9 );> > Day10 = Ref( C, -10 );> > Day11 = Ref( C, -11
);> > Day12 = Ref( C, -12 );> > Day13 = Ref( C, -13
);> > Day14 = Ref( C, -14 );> > Day15 = Ref( C, -15
);> > Day16 = Ref( C, -16 );> > Day17 = Ref( C, -17
);> > Day18 = Ref( C, -18 );> > Day19 = Ref( C, -19
);> > Day20 = Ref( C, -20 );> > Day21 = Ref( C, -21
);> > Day22 = Ref( C, -22 );> >> >>
>> > barcolor = IIf( Day22 < Day18, 4, IIf( Day22 >Day18,
8, 20 ) );> > barcolor = IIf( Day21 < Day17, 4, IIf(Day21
>Day17, 8, 20 ) );> > barcolor = IIf( Day20 < Day16, 4,
IIf( Day20 >Day16, 8, 20 ) );> > barcolor = IIf( Day19 <
Day15, 4, IIf( Day19 >Day15, 8, 20 ) );> > barcolor = IIf(
Day17 < Day14, 4, IIf( Day18 >Day14, 8, 20 ) );> >
barcolor = IIf( Day16 < Day13, 4, IIf( Day17 >Day13, 8, 20 )
);> > barcolor = IIf( Day16 < Day12, 4, IIf( Day16 >Day12, 8,
20 ) );> > barcolor = IIf( Day15 < Day11, 4, IIf( Day15
>Day11, 8, 20 ) );> > barcolor = IIf( Day14 < Day10, 4,
IIf( Day14 >Day10, 8, 20 ) );> > barcolor = IIf( Day13 <
Day9, 4, IIf( Day13 >Day9, 8, 20 ) );> > barcolor = IIf(
Day12 < Day8, 4, IIf( Day12 >Day8, 8, 20 ) );> >
barcolor = IIf( Day11 < Day7, 4, IIf( Day11 >Day7, 8, 20 )
);> > barcolor = IIf( Day10 < Day6, 4, IIf( Day10 >Day6, 8, 20
) );> > barcolor = IIf( Day9 < Day5, 4, IIf( Day9 >Day5,
8, 20 ) );> > barcolor = IIf( Day8 < Day5, 4, IIf( Day8
>Day4, 8, 20 ) );> > barcolor = IIf( Day7 < Day3,4,
IIf( Day7 >Day3, 8, 20 ) );> > barcolor = IIf( Day6 <
Day2, 4, IIf( Day6 >Day2, 8, 20 ) );> > barcolor = IIf(
Day5 < Day1, 4, IIf( Day5 >Day1, 8, 20 ) );> >>
>> >> >> > /* Colourized price bars drawn
here */> > //Graph0BarColor = barcolor;> > Graph0Style =
2+4; // Bar Graph> > Graph0BarColor = barcolor;> > Graph0
= Volume;> >> >>
>
Yahoo! Groups
Sponsor>
[Image]> >> > Your use of Yahoo! Groups is subject tothe
Yahoo! Terms of Service.Your use of Yahoo! Groups is
subject to the Yahoo! Termsof
Service.
|