Rank:: Newbie
Groups: Registered, Registered Users Joined: 4/8/2006(UTC) Posts: 6 Location: Melbourne, Australia
|
Hello all,
Can anyone help me please.
Im trying to code a simple indicator of a horizontal line. I have used the INPUT function which gives me the line I want on individual stocks (simple stuff right!) but I am having difficulties trying to code an exploration or even an alert that will tell me when the recent closing price is greater than the horizontal line.
Cheers
|
|
|
|
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)
|
Cross(C,20) will find stocks crossing above the 20 dollar price range
Cross(20,C) will find stocks crossing below to 20 dollar price range
The simple use of this function in this manner will not be helpful, it just tells you that the stock is moving in a particular direction for the time being
|
|
|
|
Rank:: Newbie
Groups: Registered, Registered Users Joined: 4/8/2006(UTC) Posts: 6 Location: Melbourne, Australia
|
Sorry Henry but this doesnt help me at all
Im trying to code an alert or exploration that can tell me stock A has crossed $10, Stock B has crossed say $2, Stock C has crossed whatever price is I require...etc
Any ideas?....
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
Just plug Henry's formula into the Explorer like this:
ColA
Cross(C,2)
ColB
Cross(C,10)
ColC
Cross(C,20)
If the most recent price crosses the value that you set, it will be flagged with a value of 1.
To filter out only those that cross, you can use the filter like this:
ColA=1 or colB=1
There is no input box like you have for indicators.
|
|
|
|
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)
|
Dear Giddyup,
Lets say a stockA started at 19 and crosses 20 and goes to 25, at the cross of 20 you got a signal ,5 point gain
Lets say a stockB started at 19 and crosses 20 and goes to 20.01, at the cross of 20 you got a signal , but it now drops back down to 15, 5 point loss
The use of a simple price level doesn't determine overbought, oversold levels, nor does it determine support and resistance when comparing different stocks
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey giddy.... perhaps if you could explain further your goal.... at first it sounded like you were interested in a indicator such as a binary wave... cross(c,10) .... that could alert you to a price closed above 10.....
you mentioned explorations, they are meant to do as henry and g have suggested.... they could find securities that have crossed values....
your mentioning alerts and a few securities crossing values almost sounds like an expert is what your after.... you could create an expert and include all sorts of alerts which would pop up when those conditions are met....
kinda feel we don't have a firm grasp of your needs.... if that's the case could you explain indepth......h
|
|
|
|
Rank:: Newbie
Groups: Registered, Registered Users Joined: 4/8/2006(UTC) Posts: 6 Location: Melbourne, Australia
|
OK ok
Firstly thanks to all for your responses.
Ok let me back it up a little say to the start.
I have the basic exploration that explores for:
1. Price.
2. Liquidity.
3. Trend.
4. Volatility.
Now this is my starting point where the results can be pages long,
then from here I open each chart and I am wanting to place an indicator which is basically a horizontal line at a price level I think that may be a trigger to buy if crossed. Eg the first chart A buy when crosses $2.5, then so on thru the list.
So then I would like to run a further exploration (on the previous results with the horizontal line) say at the end of the week to show what stocks have crossed this horizontal line? Is this clearer now?
Now an expert advisor sounds good but that might be a little too much for my brain cell to handle #-o but unless if you think it can be done by all means.....
Thanks again G
GiddyUp YeeeHaw!
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey giddyup..... gottcha now..... not sure how we would go about exploring for the crossing of a line we manualy placed on seperate charts.... unless that line was a certain precentage above the close on each of the charts.... with lines of differing values and no common denominator it might be a real task.....
but your gee-haw plan is clear now, will study on abit further and let ya how it turns out......hehe..... h
|
|
|
|
Rank:: Newbie
Groups: Registered, Registered Users Joined: 4/8/2006(UTC) Posts: 6 Location: Melbourne, Australia
|
hey Hey
Hows it going with this one
Hope its not causing you too much headaches
Youd think that a simple price alert was a standard function for most software especially Metastock with all its bells and whistles?.....hmm
Could be worth marketing this one but Im sure someone has it somewhere out there in cyberspace....
:boire:
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey giddyup..... the only thing that comes to mind would be to the use of an expert..... depending on the number of securities it would be quite easy.... a single expert could be used to hold all securities and when attached to any security the alerts would pop up in real time ..... or at end of day if using eod.....
in the alert section of the expert you would just type in the proper seccurity information and the level your interested in crossing..... such as
Security("C:\\MetaStock Data\\nasdaq 100\\apcc", c) >23
Security("C:\\MetaStock Data\\nasdaq 100\\csco",c ) >21.5
Security("C:\\MetaStock Data\\dow 30\\cat", c) > 76
Security("C:\\MetaStock Data\\amex\\bgo",c ) >4.75
Security("C:\\MetaStock Data\\russell 3000\\bjs",c ) > 35
Security("C:\\MetaStock Data\\reuters BM Data\\.oex",c ) > 590
you could also use the writeif function to have meta write out your thoughts..... that would go in the commentary section of the expert, some examples below ..... the commentary method might be abit easier..... you could do both..... all should be in the same expert......it might appear difficult, its not...... the expert does not have to be attached to anything for the commentary method to work........h
writeif(Security("C:\\MetaStock Data\\nasdaq 100\\apcc", c) >23 , "appc closed above 23")\
writeif(Security("C:\\MetaStock Data\\nasdaq 100\\csco",c ) >21.5, "csco closed above 21.5"\
writeif(Security("C:\\MetaStock Data\\dow 30\\cat", c) > 76, "cat is going for 76 bucks"\
writeif(Security("C:\\MetaStock Data\\amex\\bgo",c ) >4.75, "bgo closed above 4.75, sell your rings"\
writeif(Security("C:\\MetaStock Data\\russell 3000\\bjs",c ) > 35, "bjs, closed above 35, fill'er up quick"\
writeif(Security("C:\\MetaStock Data\\reuters BM Data\\.oex",c ) > 590, "thunderdome closed above 590"\\
|
|
|
|
Rank:: Newbie
Groups: Registered, Registered Users Joined: 4/8/2006(UTC) Posts: 6 Location: Melbourne, Australia
|
Thanks hayseed you are a true champion!
will give it a go and let ya know if she's alright
G
|
|
|
|
Rank: Newbie
Groups: Registered Users, Subscribers Joined: 10/30/2015(UTC) Posts: 7
|
how to use Alert functionality for files of DAT. Could you help on this as well.
Like F1.Dat, F2.Dat.
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 92 times Was thanked: 155 time(s) in 150 post(s)
|
This is an old topic, but to answer your question, the Security Function is how you can refer to items other than the base security within a chart. This uses the Ticker Symbol, not the physical filename. The Security function does not recognize the local data filenames such as F1.DAT, etc.
|
|
|
|
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.