Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Just to add some more ideas to the mix.... If you are looking for a particular condition, but want to find the most recent time the first instance the condition is true, by using an exploration: Code:
{Col A MOV-8}
mov(c,8,e)
{Col B MOV-13}
mov(c,13,e)
{Col C MOV-21}
mov(c,21,e)
{Filter}
ma1:=mov(c,8,e);
ma2:=mov(c,13,e);
ma3:=mov(c,21,e);
cond:=ma1>ma2 and ma2>ma3;
cond and Alert(cond=0,2);
The above exploration will find equities meeting the criteria on the most recent bar and this may not be that useful, so we can change it around slightly: Code:
{Col A When}
ma1:=mov(c,8,e);
ma2:=mov(c,13,e);
ma3:=mov(c,21,e);
cond:=ma1>ma2 and ma2>ma3;
barssince(cond and Alert(cond=0,2));
{Filter}
ColA>=0;
You can sort by ColA by clicking on the column header in the report to see the mopst recent events first. And by combining these two together, you can end up with an exploration where the condition is true and also get to find out when it became true: Code:
{Col A When}
ma1:=mov(c,8,e);
ma2:=mov(c,13,e);
ma3:=mov(c,21,e);
cond:=ma1>ma2 and ma2>ma3;
barssince(cond and Alert(cond=0,2));
{Filter}
ma1:=mov(c,8,e);
ma2:=mov(c,13,e);
ma3:=mov(c,21,e);
cond:=ma1>ma2 and ma2>ma3;
cond and ColA>=0;
Hope this helps. wabbit [:D]
|