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

Re: holdtill()



PureBytes Links

Trading Reference Links

Hi Don,
At first, function hold does not accept variable period.
Is it possible to be specific, which value do you 
want to hold and until which condition.
I will give an example:
Suppose the value of Close is C1 when macd crosses and 
becomes greater than its signal and you want to hold this value until
stochd() crosses and becomes less than 70.
And another question:After the condition occurrence what will be the
value you were holding?The usual value, zero or something else?
The problem is not always solved with Flip function.
An example would help us give the proper reply.
Dimitris Tsokakis
--- In amibroker@xxxx, farriners@xxxx wrote:
> Hi,
> 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!)
> Regards Don.