Hello All,
I am new to Metastock and I am trying to work out how to write a simple formula but I am unable to do it so I am hoping someone can help me here. It's should be very simple but still I cannot work out how to do it.
This is what I have so far -
EL:=H > Ref(HHV(H,20),-1); {Enter Long Position on a New 20 Period High}
CL:=L < Ref(LLV(L,10),-1); {Exit Long Position on a New 10 Period Low}
ES:=L < Ref(LLV(L,20),-1); {Enter Short Position on a New 20 Period Low}
CS:=H > Ref(HHV(H,10),-1); {Exit Short Position on a New 10 Period High}
EnterLongTrigger:= EL;
I want my "EnterLongTrigger" to only give me a signal to buy long if my previous trade WAS NOT Profitable.
In other words if my previous buy signal proved to be a profitable trade then disregard this buy signal.
How can I write this?
Thank You
I am new to Metastock and I am trying to work out how to write a simple formula but I am unable to do it so I am hoping someone can help me here. It's should be very simple but still I cannot work out how to do it.
This is what I have so far -
EL:=H > Ref(HHV(H,20),-1); {Enter Long Position on a New 20 Period High}
CL:=L < Ref(LLV(L,10),-1); {Exit Long Position on a New 10 Period Low}
ES:=L < Ref(LLV(L,20),-1); {Enter Short Position on a New 20 Period Low}
CS:=H > Ref(HHV(H,10),-1); {Exit Short Position on a New 10 Period High}
EnterLongTrigger:= EL;
I want my "EnterLongTrigger" to only give me a signal to buy long if my previous trade WAS NOT Profitable.
In other words if my previous buy signal proved to be a profitable trade then disregard this buy signal.
How can I write this?
Thank You