Bill Williams and his strategies... - page 5

 
I should add a little: using MT fractal indicators be careful - they are buggy (they do not draw bi-directional fractals on the same bar).
Further, the question to those who coolly use the system, how do you deal with flat, when tops and bottoms of fractals form clusters of nearby values with a slight difference of 2-3 points?
 

Hello!

Can you please tell me what's wrong with my code!

I don't know if it's a fractal or a position opening, but I can't open a short (Sell) position.

For more details, please tell me how to correctly prescribe a fractal breakthrough and how to write a reverse system.

When tested in the Strategy Tester, does it consider swop?

Files:
 
Jahve писал (а):

Hello!

Can you please tell me what's wrong with my code!

I don't know if it's a fractal or a position opening, but I can't open a short (Sell) position.

For more details, please tell me how to correctly prescribe a fractal breakthrough and how to write a reverse system.

When tested in the Strategy Tester, does it consider swop?


Oh, SESSION )))) but I would have helped )))). I think it's a good idea to have an Expert Advisor, if the manual trading is going well)

Regards, Oasis

 
Oasis писал (а):

Oh, SESSION )))) otherwise would have helped )))) I think it's a good idea to have an Expert Advisor, if the manual trading is going well)

Regards, Oasis


I understand! I had a session too!

It worked pretty good on the Hourly Franc, or rather not, but I accidentally deleted it :(

I also did a reverse strategy with similar conditions in Metastock, the drawdown was minimal. However, MetaTrader does not quite correctly understand the terms, or I have not written them correctly.

The conditions are simple: we enter a long position when the last fractal is higher than the Alligator
Enter a short position similarly, when the price breaks the last fractal downwards, if it was below the Alligator.

I have not thought of the exit yet, I tried MA, it often leaves early. I try to oprimize it by stops and trailing stops.
I have tried to use reversal in Metastock.
 
Jahve, the reason why short positions don't come off is because the fractals are not defined correctly. The variable FractalDown is defined on each bar, that is, if there is no fractal it becomes 0 --> and it should remember the last fractal.
 
Oasis писал (а):
Jahve, the reason why short positions don't open is because the fractals are not defined correctly. The FractalDown variable is defined on each bar, i.e. if there is no fractal, it becomes 0 --> while it should remember the last fractal.

Vladimir, please tell me how to write this correctly!

I already tried shift = 0 and =3, I thought the signal appears after the fractal
formed i.e. on the 3rd bar after the fractal top, it does not work and that's it!

I saw in your profile that you are participating in the championship!
Do you trade by Williams?

 
Jahve писал (а):
Oasis wrote (a):
Jahve, the reason why short positions don't come off is because fractals are not defined correctly. The FractalDown variable is defined on every bar, i.e. if there is no fractal it becomes 0 --> while it should remember the last fractal.

Vladimir, please tell me how to write correctly!

I already tried shift = 0 and =3, I thought the signal appears after the fractal
formed i.e. on the 3rd bar after the fractal top, it does not work and that's it!

I saw in your profile that you are participating in the championship!
Do you trade by Williams?


1. The correct version can be seen in the script, which I have already posted in this thread (on either page 1 or 2).

2. In the championship adviser which has nothing to do with profinite)))).
I wrote it more than a year ago, I think it was not completed and has a lot of code errors in it for 500 lines, and the plan should be for 1000)))

3. I use B.V.'s work in trading, but

1) I have a different output system.
2) I use a certain tick volume for filtering
3) more certain chips for filtering ))))

I seem to trade quite successfully and only manually ))))

 
Thanks, Vladimir!

Do you know what indicator can detect a flat, if at all!

I tried to use two SARs with different pitch, the flat is partially filtered out, but the SAR lags.

In general, I like alligator and fractals from Williams' strategy because they are ingeniously simple, i.e. fractals are local extrema and alligator is a trend indicator.
The logic is simple, if there is a trend and the price breaks through the previous barrier in that direction, consequently we should expect the movement in that direction for some time.

I am not able to trade manually, I am just betting on the MTS development.

Do you trade on real account? What brokerage company?

I think it is not a problem to develop a profitable strategy, but honest brokerage companies are a real problem in Russia.
 
Jahve писал (а):
Thank you, Vladimir!
Do you know what indicator can identify the flat, if at all!
I've tried using two SARs with different pitches, the flat is partially filtered out, but the SAR lags.

........................

Are you trading on real account? What brokerage company?
I think it may be OK to develop a profitable strategy, but the honest brokerage companies are a real problem in Russia.

When I started to trade I tried to open some positions but I would not trade more, so I would not take them for a long time.
By the way, the code I have in the past but I have not got any info on it.)
By the way, there's a small error in the code I cited with fractals - the opening at them occurs only at the opening price!
 

I'm not good at programming, I only know the basics, so I can't figure out your code quickly.
But thanks anyway!

I also wanted to ask: does the tester take into account spread and swop?

Reason: