Rank: Member
Groups: Registered, Registered Users Joined: 10/19/2005(UTC) Posts: 22
|
Hi,
Need some help with Metastock language. If I want to make an expert whereby sell is interpreted as - "The First Big Black Candle after a Stoch & Stoch MA crossover" how do I write it?
Thanks,
Ropewalker
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey souray.... jose had posted something for similiar type question a few days back.... the prior question involved cci but it was the actual line of thinking of the code layout that appealled most to me.... think of presetup and then signal..... you didn't mention values so change to suit and see if the below might work.....h
black candle after stoch cross
{ format ripped off from http://www.metastocktools.com }
{ #1 3 period ma cross below stoch(5,3) }
preSetup:= Cross(Mov(Stoch(5,3),3,E),Stoch(5,3));
{ #2 black candle}
signal:= BigBlack();
{ Buy signal }
buy:=presetup AND signal;
{ Plot in own window }
buy
-----------------------------------------------------------------------
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
an exploration for your signal might be something like below.... while not being handy with candles myself, i did take the liberty/risk in assuming the converse of your sell conditions as a possible buy, hence column a.....
column a name 'buy'
Mov(Stoch(5,3),3,E)< Stoch(5,3) and Bigwhite()
column b name 'sell'
Mov(Stoch(5,3),3,E)> Stoch(5,3) and BigBlack()
filter
cola or colb
---------------------
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 10/19/2005(UTC) Posts: 22
|
Hi,
Thanks for your reply. Regarding the levels, I would like to restrict my buys within the Stoch level of 65, but important is how to avoid the clutter? If I take a buy signal immediately after the Stoch crossover on the 1st big bull candle then I get multiple signals eminating from all the big bull bars after the crossover. I want to confine the signal to the first one only, how do I do it?
thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey souray.... in that case you would add [color=red:49d6df1012]stoch(5,3)>65 [/color]...... limiting the stoch level might bring on some other concerns.... below would be something like the code needed....
as far as the clutter, your deal is far less cluttered than what i use daily..... roy larson, he's mstt here on the forum, has some code commonly call 'init'..... that code i believe was developed to reduce the clutter..... it would suit your needs perfectly......h
===================
candle 65
===================
{ layout ripped off from http://www.metastocktools.com }
{ #1 3 period ma cross below stoch(5,3) }
preSetup:= Cross(Mov(Stoch(5,3),3,E),Stoch(5,3));
{ #2 black candle}
signal:= BigBlack() [color=red:49d6df1012]AND Stoch(5,3)>65[/color];
{ Buy signal }
buy:=presetup AND signal;
{ Plot in own window }
buy
=============================
changed explor to add stoch level
column a name 'buy'
-----------------------
Mov(Stoch(5,3),3,E)< Stoch(5,3) and Bigwhite()
-----------------------
column b name 'sell'
----------------------
Mov(Stoch(5,3),3,E)> Stoch(5,3) [color=red:49d6df1012]and stoch(5,3)>65 [/color]and BigBlack()
----------------------
filter
---------------------
cola or colb
---------------------
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 10/19/2005(UTC) Posts: 22
|
Hi,
I actually need to select only the first bigwhite bar after the crossover, can u suggest how can I select only the 1st big white bar after the crossover? I am testing this system for realtime charts for a non-volatile mkt. where the stoch tends to trickle along the 20 levels or 80 levels creating multiple entry/exit points.
thanks
sourav
|
|
|
|
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.