logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
nasdaqtrader  
#1 Posted : Tuesday, October 11, 2011 4:52:11 AM(UTC)
nasdaqtrader

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
jjstein  
#2 Posted : Tuesday, October 11, 2011 11:07:39 AM(UTC)
jjstein

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.

henry1224  
#3 Posted : Wednesday, October 12, 2011 1:11:12 PM(UTC)
henry1224

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
jjstein  
#4 Posted : Wednesday, October 12, 2011 1:30:41 PM(UTC)
jjstein

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;


nasdaqtrader  
#5 Posted : Monday, October 24, 2011 9:43:08 AM(UTC)
nasdaqtrader

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
jjstein  
#6 Posted : Monday, October 24, 2011 10:58:57 AM(UTC)
jjstein

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


theghost  
#7 Posted : Saturday, October 29, 2011 3:20:17 PM(UTC)
theghost

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;
UserPostedImage
Any ideas?
TheGhost

jjstein  
#8 Posted : Saturday, October 29, 2011 5:13:49 PM(UTC)
jjstein

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;



theghost  
#9 Posted : Sunday, October 30, 2011 12:12:12 PM(UTC)
theghost

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.