Rank: Newbie
Groups: Registered, Registered Users Joined: 1/17/2010(UTC) Posts: 3
|
Hi everyone. Just to let you know, I am new to writing formula. I am wanting to create a search for a Doji candlestick that has had at least 2 black candles before it. I have made a few attempts but have failed. If someone could show me how to do this it would be appreciated. Also does anyone now why you get an error message saying (End of function ')' expected.)
Thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 7/12/2007(UTC) Posts: 134 Location: Perth Western Australia
|
Hi Thirty,
Glad to read that you,ve tried to code your request.
Perhaps if you post the code that you attempted someone will be able to assist.
Cheers,
oz
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 1/17/2010(UTC) Posts: 3
|
Thanks for the reply Oztrader.
My atttempt looks like this.
Alert(Doji(),1) AND Alert(Black(),3)
This doesn't seem to work. I only want a doji candle formation from the last close. This I attempt with { Alert(Doji(),1) } From what I have read I think this should work. The second section { Alert(Black(),3) } is for the 2 candles before the doji to be black. I think my problem is that { Black() } is for a candle with a black body and I have included the doji candle that doesn't have a body in the second part of the formula. So possibly (But not sure) Maybe I need to develop a range to start from the close previous to the last close and end on the 3rd previous close. I am not to sure how to create that range?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 7/12/2007(UTC) Posts: 134 Location: Perth Western Australia
|
Hi Thirty,
The conclusions you have drawn in the last 2 sentences are correct.
So based on your comments we get the following result:-
Today = Doji() Yesterday = Black() {Ref(Black(),-1) or 1bar ago} The day before Yesterday = Black() {Ref(Black(),-2) or 2 bars ago}
which when joined together as a condition we get:-
Doji() AND Ref(Black(),-1) AND Ref(Black(),-2)
Cheers, oz
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 1/17/2010(UTC) Posts: 3
|
Ah!
Thats is much clearer to me now. I had a couple of goes using the ref function but couldn't seem to get it. Appreciate the help Oz.
Thanks
|
|
|
|
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.