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

Re: [amibroker] holdtill()



PureBytes Links

Trading Reference Links

Hello,


> > The function hold(expression,periods) obviously needs to know the
> > number of periods.
> > I want to hold a value until a condition occurs.
> > I have suggested to TJ that a holdtill(expression,condition) would be
> > useful.
> > Can anyone suggest a way to code this? (in case TJ doesnt like the
> > idea!)
> 
> Don,
> Try function Flip()
> 
> .....
> exp1 = expression();
> cond1 = condition();
> exp1 = Flip(exp1, cond1);

Marek is right. Flip() function does the job.
Thank you Marek for pointing this out.

Best regards,
Tomasz Janeczko
amibroker.com