Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
dear HBNmgr, The formula that I provided works for the conditions that were stated, I tested it on a daily chart of UTX. You are changing the parameters with smaller and faster indicators. Code:
BBPer:=Input("BBands",5,100,21);
MAPer:=Input("MA",2,100,14);
LSetup:=Sum(C<BBandBot(C,BBPer,S,2),2)>1;
SSetup:=Sum(C>BBandTop(C,BBPer,S,2),2)>1;
LTrigger:=Cross(C,Mov(C,MAPer,E));
STrigger:=Cross(Mov(C,MAPer,E),C);
Long:=(Alert(LSetup,5) + LTrigger) =2;
Short:=(Alert(SSetup,5) + STrigger) =2;
Signal:=Long-Short;
Signal;
this is a long/ short version
Code:Identify a contiguous string of 2 or more events and then the occurence
of a different event within a defined period, for example look for two
or more closes below the BBandBot (setup) then wait for a close above an
EMA (trigger) with a time limit of say 5 days from the setup.
Two contiguous events will still remain valid if the next bar extends the contiguous event to three in a row !It will still remain an active setup, all it does is to push the alert back one bar
|