Topic: Doji pattern in FSB

Dear forum,

I think it could be very interested if it was possible to include a doji candle pattern in a strategy in the FSB.
I have worked out this formula:

( ( high() - low() ) * 0.64 ) >= (( close () - open() )*(close()-open())) and high() - low() > 1

This think this will be able to scan for dojis with a body no larger then 8 % of the high of the candle minus the low of the candle.

Does anyone know how this can be created as an indicator that can be used in FSB?

Best regards
Itai

Re: Doji pattern in FSB

http://s2.postimage.org/cwWwr.jpg

The formula was changed a little. You can correct it if you want.

double point = (Digits == 5 || Digits == 3) ? 10 * Point : Point;
double maxOpenClose = 5 * point;
double minHeight    = 1.2 * maxOpenClose;

for (int iBar = 1; iBar < Bars; iBar++)
    if (Math.Abs(Close[iBar - 1] - Open[iBar - 1]) < maxOpenClose && High[iBar - 1] - Low[iBar - 1] > minHeight)
        doji[iBar] = 1;
Post's attachments

Doji.cs 3.89 kb, 126 downloads since 2010-09-20 

You don't have the permssions to download the attachments of this post.

Re: Doji pattern in FSB

Dear Popov|
open()-close()|<=(( high() - low() )*p ) for Small body

|open()-close()|>=(( high() - low() )*p ) for big body


p=Percent .9 to 0.5 for small
p= Percent .5 to 0.1 for big

We need an Indicators calculates this equation with the possibility for give us Insert  variable  of Percent to make Optimizing

4 (edited by FOX000 2010-09-20 05:52:22)

Re: Doji pattern in FSB

The problem has been resolved
thanks  Popov.

Re: Doji pattern in FSB

Popov, thanks for the fast response and the attached indicator.

Just to understand it correctly.

double maxOpenClose = 5 * point;
double minHeight    = 1.2 * maxOpenClose;

Does the first line of this code indicate the size of the body of the doji? That the body can be max 5 points?
Can I adjust somewhere that the body of the doji maximum should be 8 percent of the total candle (highest - lowest)?
And a final question, is there in this indicator any limitation to the size of the total candle (Highest - lowest)?

Re: Doji pattern in FSB

double point = (Digits == 5 || Digits == 3) ? 10 * Point : Point;

This line compensate 5 digit quotations. Using it you can set n * point where "n" will work with 5 digits as well as 4 digit quotation.

double maxOpenClose = 5 * point;

together with

Math.Abs(Close[iBar - 1] - Open[iBar - 1]) < maxOpenClose

limits the max body height to 5 pips.


If you want percent rate, you can use:

if (Math.Abs(Close[iBar - 1] - Open[iBar - 1]) < PERCENT * (High[iBar - 1] - Low[iBar - 1]))
    ...

You can use an entry numerical box to setup PERCENT value from the Indicator Properties dialog window.

Re: Doji pattern in FSB

Thanks for the guidance.

I have now entered the percentage setup into the attached indicator.

I think it is correct, but it seem to work in back tests. Now it is interesting if it also works in forward testing.

If you have a moment please take a look at the coding. When I have results from the forward testing I will let you know of the performance.

Post's attachments

Doji v2.cs 4.27 kb, 124 downloads since 2010-09-20 

You don't have the permssions to download the attachments of this post.

Re: Doji pattern in FSB

I couldn't get these to work. They just put exclamation points above candles. Thoughts?

Thanks.

Re: Doji pattern in FSB

Exclamation points -- sounds like ambiguous signal. The indicator is telling it both long and short at the same time, in the side panel, "Allow Long/Short Entry" will both say "yes". Try adding another indicator to break the tie.

Re: Doji pattern in FSB

Popov wrote:

http://s2.postimage.org/cwWwr.jpg

The formula was changed a little. You can correct it if you want.

double point = (Digits == 5 || Digits == 3) ? 10 * Point : Point;
double maxOpenClose = 5 * point;
double minHeight    = 1.2 * maxOpenClose;

for (int iBar = 1; iBar < Bars; iBar++)
    if (Math.Abs(Close[iBar - 1] - Open[iBar - 1]) < maxOpenClose && High[iBar - 1] - Low[iBar - 1] > minHeight)
        doji[iBar] = 1;

Re: Doji pattern in FSB

HELLO
PLEASE, I DOWNLOADED THE DOGI BUT i COULD NOT INSTALL IT ON MY MT4

Re: Doji pattern in FSB

This indicator was designed to work with Forex Strategy Builder and Forex Strategy Trader.