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

Notification

Icon
Error

Options
Go to last post Go to first unread
GameTime  
#1 Posted : Friday, May 20, 2011 10:01:21 AM(UTC)
GameTime

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 1/22/2011(UTC)
Posts: 34

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Hi Guys, i would very much appreciate some help with the following.

I would like to take the below Indicator formula and turn it into 2 separate explorers -


LookBack := Input("Look Back Periods",1,1000,10);
Resistance :=ValueWhen(1,Cross(Mov(C, LookBack,
S),C),HHV(H, LookBack));
Support :=ValueWhen(1,Cross(C,Mov(C, LookBack,
S)),LLV(L, LookBack));
Resistance;
Support;



1- t
o search for close prices below the Support Level.
2-to search for close prices above the Resistance Level.

So far iv come up with this:

C>???????????????

and

C<???????????????


LOL


All help would be greatly appreciated.
Thanks in advance.
naren.orbit  
#2 Posted : Friday, May 20, 2011 11:31:33 AM(UTC)
naren.orbit

Rank: Member

Groups: Registered, Registered Users
Joined: 4/26/2011(UTC)
Posts: 14
Location: india

thanks about this . i will chek ...........
GameTime  
#3 Posted : Sunday, May 22, 2011 8:53:29 PM(UTC)
GameTime

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 1/22/2011(UTC)
Posts: 34

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Anyone able to assist me?
jjstein  
#4 Posted : Sunday, May 22, 2011 9:22:14 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)
There are several ways to do this, but since you said two separate Explorations, try these:

EXPLORATION 1: In the FILTER Tab:
{ Signal when CLOSE goes above Resistance }
LookBack := 10;
Resistance :=ValueWhen(1,Cross(Mov(C, LookBack,S),C),HHV(H, LookBack));
Cross(C,Resistance);



EXPLORATION 2: In the FILTER Tab:
{ Signal when CLOSE goes below Resistance }
LookBack := 10;
Support :=ValueWhen(1,Cross(C,Mov(C, LookBack,S)),LLV(L, LookBack));
Cross(Support,C);


Instead of CROSS, consider using SUM with C greater/lesser than the relevant line, if you wanted to know if the CLOSE stayed above/below either line.

GameTime  
#5 Posted : Monday, May 23, 2011 9:30:23 AM(UTC)
GameTime

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 1/22/2011(UTC)
Posts: 34

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
thank you so much jjstein,
really appreciate your help.

I do have 1 more small request, is it possible to incorporate that explorer formula into a metastock adviser.

for example if i use MACD buy signal, i would like to edit it so the above condition of a buy only takes effect if the close price is above the resistance level.

is this possible?
jjstein  
#6 Posted : Monday, May 23, 2011 11:52:31 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)
The easy way is to copy the indicator and add the buy condition. Then you can use the indicator directly or use FML to call it from the Expert Symbol tab.

If you want to change "LookBack", you, must change the default in the indicator -- you can't use "Input" in an Expert, Exploration or System Test. If you want to put it directly in the Expert, replace the "Input" code line with "Lookback:=10;".

To use the indicator directly, just drag it into the chart. I'd suggest changing the line style to vertical bars and using a different color for Buy vs. Sell; it's a quick way to see if the code is doing what you want and you can double-click to edit/change the parameters or code -- before using it elsewhere.


{ NAME: _GameTime Buy
Close over resistance and MACD }
LookBack := Input("Look Back Periods",1,1000,10);
Resistance :=ValueWhen(1,Cross(Mov(C, LookBack,
S),C),HHV(H, LookBack));

C>Resistance
AND Cross(MACD(),Mov(MACD(),9,EXPONENTIAL))


{ NAME: _GameTime Sell
Close under support and MACD }
LookBack := Input("Look Back Periods",1,1000,10);
Support :=ValueWhen(1,Cross(C,Mov(C, LookBack,
S)),LLV(L, LookBack));

C<Support
AND Cross(Mov(MACD(),9,EXPONENTIAL),MACD())

*****************
EXPERT -- Symbol tab

BUY: Fml("_GameTime Buy")
SELL: Fml("_GameTime Sell")


GameTime  
#7 Posted : Thursday, May 26, 2011 9:35:38 AM(UTC)
GameTime

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 1/22/2011(UTC)
Posts: 34

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Thankyou very much for your help Johnathan, its very much appreciated. Everything worked perfect and it was exactly what i was looking for. Thanks again. :-)
jjstein  
#8 Posted : Thursday, May 26, 2011 11:01:48 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)
You're welcome.

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.