PureBytes Links
Trading Reference Links
|
I have used this
IH = ValueWhen(Cross (High, TT(High, 2, Hotkey)), High);
// intercept T2 with High
IL = ValueWhen(Cross (TT(Low, 2, Hotkey), Low), Low );
// Intercept T2 with Low
when the High or Low changes the MA (TT) changes.
So the intercept point is a dynamic target and I thought a
"for" loop could incrument the "High" + i of the MA and High
at the same time. Compare and get the answer, but "IIF"
yields the wrong an incorect answer. I've tried
A = H;
for(i=0; i<600; i++)
{
W = IIf((A+(i/100))<=(TT(A+(i/100), 2, Hotkey)), 0, 1); //
Intercept High
IH = (A+(i/100)); // Assign
until = <
if(W=1) i = 700; //
Brake the for Loop
}
The TT (ma) is Tim Tillson's ma.
I'm looking for the intersection not the crossing, and
I want it projected against the current (incompleted) candle.
Carl
--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> what price are you trying to find, and what price crossing MA
(C,3) ?
> Is it the price of the MA ?
>
> this should work as was above as Herman provided
>
> Intercept = Cross( C, MA(C,3) ) ;//cross of Close above the MA
> InterceptPrice = Valuewhen( Intercept, C);//value of Close at the
intercept
>
> if the MA price at intercept
>
> InterceptPrice = Valuewhen( Intercept, MA(C,3));//value of MA at
the intercept
>
>
> On Mon, 07 Feb 2005 21:32:19 -0000, Carl K <KB0EBG@xxxx> wrote:
> >
> >
> > Those commands worked, but gave the wrong answers.
> > I feel I will need to do it from a loop.
> > Loops do not accept Arrays so far.
> > There must be a work around.
> > I tried IIF's to see if it would furnish a number
> > that was not an array and have had no luck.
> >
> > someone else must have fought the same problems.
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Herman van den Bergen"
> > <psytek@xxxx> wrote:
> > > Did you try using
> > >
> > > Intercept = Cross( Price, MA(C,3) ) ?
> > >
> > > or if you need the Intercept price:
> > >
> > > InterceptPrice = Valuewhen( Intercept, C);
> > >
> > > best regards,
> > > herman
> > > -----Original Message-----
> > > From: Carl K [mailto:KB0EBG@x...]
> > > Sent: Sunday, February 06, 2005 1:49 PM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] Intercept Help
> > >
> > >
> > >
> > > I have tried to calculate an intercept of price and a ma.
> > > I tried
> > >
> > > for(i=0; THi2<THi; i++) // THi2>Test Test++ This
is
> > the logic
> > > {
> > > THi = High + (i/100);// Test High = High + .01 incrument
> > > THi2 = DEMA(THi, 3); // DEMA of Test High
> > > }
> > >
> > > had no luck saving it, so I modified it to
> > >
> > > // Calculate the intercept
> > > MB = 1;
> > >
> > > for(i=0; MB > 0; i++) // THi2>Test Test++
This
> > is the
> > > logic
> > > { THi = High + (i/100); // Test High = High
+ .01
> > > incrument
> > > THi2 = DEMA(THi, 3); // DEMA of Test High
> > > MB = IIf(THi2>THi, 1, 0); // Test to Make/Break
loop
> > > }
> > > // no luck either
> > >
> > > I must be missing something.
> > >
> > > Carl
> > >
> > >
> > >
> > >
> > >
> > > Check AmiBroker web page at:
> > > http://www.amibroker.com/
> > >
> > > Check group FAQ at:
> > > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > >
> > >
> > >
> > > ---------------------------------------------------------------
----
> > ---------
> > > --
> > > Yahoo! Groups Links
> > >
> > > a.. To visit your group on the web, go to:
> > > http://groups.yahoo.com/group/amibroker/
> > >
> > > b.. To unsubscribe from this group, send an email to:
> > > amibroker-unsubscribe@xxxxxxxxxxxxxxx
> > >
> > > c.. Your use of Yahoo! Groups is subject to the Yahoo!
Terms
> > of Service.
> >
> >
> > Check AmiBroker web page at:
> > http://www.amibroker.com/
> >
> > Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>
>
> --
> Cheers
> Graham
> http://e-wire.net.au/~eb_kavan/
------------------------ Yahoo! Groups Sponsor --------------------~-->
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|