[amibroker] Re: coding help request- higer values...

2009-08-04 Thread Mike
Your logic is flawed. Cond3 can never be true. Note that Cross returns 1 or 0. So, there are 3 possible scenarios for any two sequential Cond1 values x,y where x is the previous bar value and y is the current bar value: 0, 0 zero followed by a zero (no recent cross) 0, 1 zero followed by a one

[amibroker] Re: coding help request- higer values...

2009-08-06 Thread shahariar4
Hi MIke: Thanks for your correction. my basic idea is to suppose i have a buy signal; that buy signal's bar has to be of higher value that the last bar where anothe rbuy signal occured. suppose for example i want to buy on pivot low signal,but i want to add a codnition to it that if this pivo

[amibroker] Re: coding help request- higer values...

2009-08-06 Thread Mike
Well, you're question is actually a bit complicated. The direct answer would be: Trigger = ...; Buy = Trigger AND Close > ValueWhen(Trigger, Close, 2); The above assumes that you wanted to buy on the trigger bar and that you would know immediately that that bar was in fact a trigger. We use a lo

[amibroker] Re: coding help request- higer values...

2009-08-06 Thread shahariar4
Mike, thank you very much again for taking your time out...i have tried your indicated way but i think its not working and its not what i ment may be...may be my mention of pivots created the confusion. suppose, cond1= ema(clsoe,3)>ema(close,15); now i want to add another condition to form the

[amibroker] Re: coding help request- higer values...

2009-08-06 Thread Mike
Shahariar, You will need to clarify what you mean by "when the value of this cond1 is greater than the last time when this cond1 occured". cond1 is a binary result and will thus only ever have 2 values: 0 or 1. There will never be a case where a later cond1 was greater than a prior cond1 since

[amibroker] Re: coding help request- higer values...

2009-08-07 Thread shahariar4
Hi MIke, thank you very much for your kind help probably i wil have to try some technique abandoning this idea...coz it does not seem working --- In amibroker@yahoogroups.com, "Mike" wrote: > > Shahariar, > > You will need to clarify what you mean by "when the value of this cond1 is