How do you merge two formulas into one???
I have a channel system that has two set-up signals, titled B1 and B2, which at present have their own separate formulas. I wish to combine these into a single formula creating a single composite signal. Below are the two formulas:
{B1 with entry signal}
{Channel}
x:=7;
y:=1.05;
z:=0.95;
UB:= Mov(C,x,S)*y;
EMA:= Mov(C,x,E);
LB:= Mov(C,x,S)*z;
{Acceptable high break above UB with rising UB}
B1:= H>UB AND H<=UB+(0.75*Abs(EMA-UB)) AND ValueWhen(1, H>UB, UB>Ref(UB,-1) );
{Entry - Price Piont}
sig:=L<=ValueWhen(1,B1, EMA-(0.2*(EMA-LB)));
{Entry-Price Piont projection}
trade:= If(b1, 0, If(sig,1, PREV));
Cross(trade=1,0.5);
{B2 with entry signal}
{Channel}
x:=7;
y:=1.05;
z:=0.95;
UB:= Mov(C,x,S)*y;
EMA:= Mov(C,x,E);
LB:= Mov(C,x,S)*z;
{Acceptable high break above UB with rising UB}
B2:= UB>H AND L>EMA;
{Price Piont}
sig:=L<=ValueWhen(1,B2, EMA-(0.2*(EMA-LB)));
{Price Piont projection}
trade:= If(b1, 0, If(sig,1, PREV));
Cross(trade=1,0.5);
I’ve been told to find a solution three questions must be answered
Q1. Which set-up condition occurs first?
A1. B1setup.
Q2. How soon after the second signal has to be the first?
A2. Could be as early as the very next price bar.
Q3 Is there any event or signal that would stop the second signal?
A3 There are 4 events that would stop signal
a) If second bar was an entry signal
b) If second bar was another B1 then this would become the new set-up signal
c) If second bar was a B2 then this would become the new set-up signal
d) If there is no B2 or B1 signal along with no entry signal
Equally it should be noted that if
a) The third bar is a B1 this would become the new set-up signal
b) The third bar was an entry signal
c) The third bar is a B2 this would become the new set-up signal
d) If there is no B2 or B1 signal along with no entry signal.
Yours truly
Gregor[:)]