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

[amibroker] Re: Valuewhen



PureBytes Links

Trading Reference Links

Chris,

Thanks for replying so fast.

In my case, Val is not constant, its array just like C. Also, L might 
not be ref-1, it can be more than 1 bars ago. And I want to know value 
of XM corrosponding to bar on which L is less than current bar's C-
Val.

Thanks again,
--- In amibroker@xxxxxxxxxxxxxxx, ChrisB <kris45mar@xxx> wrote:
>
> Hi Jay
> 
> See if this is what you are looking for:
> 
> Val = Param("Val",1.5 , 1, 3, 0.1);
> 
> XM = High;//for argument's sake.
> 
> CminusVal = Close - Val;
> Cond1 = Ref(L,-1) < (C-Val);
> myXM= ValueWhen ( Ref(L,-1) < (C -Val),XM);
> 
> // run the Exploration to check you values
> Filter = 1;
> 
> AddColumn(Val,"Val", 1.2);
> AddColumn( XM,"XM", 1.2);
> AddColumn (C, "close",1.2);
> AddColumn(Ref(L,-1),"ref L",1.2);
> AddColumn( CminusVal,"ClessVal",1.2);
> AddColumn( Cond1, "Cond1", 1.2);
> AddColumn ( myXM, "my XM", 1.2);
> 
> // Plot these to visually check
> Plot( myXm,"myXM", colorBlue,1);
> Plot( Cond1, "Cond1",colorRed,styleHistogram |styleOwnScale);
> 
> Regards
> 
> ChrisB
> 
> jay_podda wrote:
> >
> > I want to find value of array XM when L of very first previous bar 
is
> > VAL amount less then current bar C.
> >
> > The problem with me is when I use valuewhen, in expression if I 
use
> > any array for comparision, I can't compare with current bar. That 
is,
> > if current bar C is 49.50 and VAL is 1.50, I want to get value of 
XM
> > array when that previous bar's L is less than 48.
> >
>




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/