Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 2/2/2005(UTC) Posts: 307
Thanks: 7 times Was thanked: 3 time(s) in 3 post(s)
|
Looking for scan help.
ADX above 40, stocks making a new 15 day high, volume bar increasing either up or down at least 30%. |
Regards,
Frank Koenig
Trade Like a Pro
Trend is your Friend |
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
Doesn't sound too hard -- post the formula which is giving you problems.
|
|
|
|
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)
|
pds:=input("length",2,100,15); Cond1:=ADX(pds)>40; Cond2:=H>Ref(HHV(H,Pds),-1); Cond3:=V>Ref(V,-1)*1.3; Signal:=Cond1*Cond2*Cond3; Signal
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
>>increasing either up or down at least 30%.
If he means "changing" instead of "increasing", Cond3 would have to be:
Cond3:=V>Ref(V,-1)*1.3 OR V<Ref(V,-1)*0.7;
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 2/2/2005(UTC) Posts: 307
Thanks: 7 times Was thanked: 3 time(s) in 3 post(s)
|
pds in Cond 1 what would you put there?
Also what is this ? pds:=input("length",2,100,15);
|
Regards,
Frank Koenig
Trade Like a Pro
Trend is your Friend |
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
>>Also what is this ? pds:=input("length",2,100,15);
That is your "15-day high" condition.
>>pds in Cond 1 what would you put there?
The usual is around 14+/- days, so Henry probably just re-used that variable. It could be separated, like this:
Lookback:=Input("New high",2,100,15); AdxBars:=Input("ADX Periods",2,100,13); Cond1:=ADX(AdxBars)>40; Cond2:=H>Ref(HHV(H,Lookback),-1); Cond3:=V>Ref(V,-1)*1.3 OR V<Ref(V,-1)*0.7; Signal:=Cond1*Cond2*Cond3; Signal
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/4/2005(UTC) Posts: 63 Location: Poole Dorset England
|
Hi jjstein, I tried to enter the formula into a new exploration, and Metastock wouldn't let me :-( Code:
Lookback:=Input("New high",2,100,15);
AdxBars:=Input("ADX Periods",2,100,13);
Cond1:=ADX(AdxBars)>40;
Cond2:=H>Ref(HHV(H,Lookback),-1);
Cond3:=V>Ref(V,-1)*1.3 OR V<Ref(V,-1)*0.7;
Signal:=Cond1*Cond2*Cond3;
It said,"This fucnction is not allowed in this type of formula." the cursor was flashing on the 1st line of code (Lookback) between the the = sign & the word Input. :-( screenshot; Any ideas? TheGhost
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
The INPUT statement can only be used in a custom Indicator. Anywhere else, you either call the Indicator using FML():
Fml("My Indicator");
...or change the statements from Input to direct assignment:
Lookback:=15; AdxBars:=13; Cond1:=ADX(AdxBars)>40; Cond2:=H>Ref(HHV(H,Lookback),-1); Cond3:=V>Ref(V,-1)*1.3 OR V<Ref(V,-1)*0.7; Signal:=Cond1*Cond2*Cond3;
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/4/2005(UTC) Posts: 63 Location: Poole Dorset England
|
Ah Ha! That's how.
Many Thanks jjstein.
Knew it could be done,,, it was just the how! TG :-)
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.