Hi,
I am trying to code Demark TD sequential. Currently working on the first part of the code i.e TD buy/sell set up.
TD Buy Set Up- Need 9 consecutive close each one less than the corresponding close four bars earlier.
I have done some coding for TD set up but there is some errors coming in. Request members to please look into it and correct/help.
TD Buy Set up
Indicator Name : 9+
C<Ref(C,-4) AND Ref(C,-1)<Ref(C,-5) AND Ref(C,-2)<Ref(C,-6) AND Ref(C,-3)<Ref(C,-7) AND Ref(C,-4)<Ref(C,-8) AND Ref(C,-5)<Ref(C,-9) AND Ref(C,-6)<Ref(C,-10) AND Ref(C,-7)<Ref(C,-11) AND Ref(C,-8)<Ref(C,-12)
Expert
1) Set Up 9
Ref( Fml("9+"),0)=1
2) Set Up 8
Ref( Fml("9+"),1)=1
3) Set Up 7
Ref( Fml("9+"),2)=1
4) Set Up 6
Ref( Fml("9+"),3)=1
5) Set Up 5
Ref( Fml("9+"),4)=1
6) Set Up 4
Ref( Fml("9+"),5)=1
7) Set Up 3
Ref( Fml("9+"),6)=1
8) Set Up 2
Ref( Fml("9+"),7)=1
9) Set Up 1
Ref( Fml("9+"),8)=1
The above expert put 1-2-3-4-5-6-7-8-9 set up numbers below the bars if , satisfy the condition.
The problem I am facing is that if after 9, if next bar also satisfy the condition of C<REF(C,-4) there is a number 9 below this (next bar) also, which must not be there. How to make it possible in metastock that even if very next bar after 9 is satisfying the condition it does not show the number 9 . Kindly help.
Attached is the chart showing the above problem.
Regards,
K