Bill Williams and his strategies... - page 25

 

Looked at it, no stops? There are several Williams EAs in the codebase, or almost Williams ones, your EA is not there?

At first glance, what if I dump AC and try to use AO as a filter - above 0 - only buying - below - only selling. And the second variant to try as a filter - to react only to the lowest or the highest fractal of the last group. I.e., if lower fractal is formed, and after it some more similar but higher ones have appeared, we should not enter them, because a change of trend is probable and there is no need to multiply losses. The same is with the highs.

By the way I noticed - AC is almost the same as OsMA and AO is MACD. Of course there are differences, but they are not very big.


 
ZZZEROXXX:

Looked at it, no stops? There are several Williams EAs in the codebase, or almost Williams ones, your EA is not there?

At first glance, what if I dump AC and try to use AO as a filter - above 0 - only buying - below - only selling. And the second variant to try as a filter - to react only to the lowest or the highest fractal of the last group. I.e., if lower fractal is formed, and after it some more similar but higher ones have appeared, we should not enter them, because a change of trend is probable and there is no need to multiply losses. The same is with the highs.

By the way I noticed - AC is almost the same as OsMA and AO is MACD. Of course there are differences, but they are not very big.



Stops are the closing of a position(s) when the price crosses the alligator tooth line. Mine are not in the codebase. I have to try to filter it...
 
Roman.:

Stops are the closing of a position(s) when the price crosses the alligator tooth line. Mine are not in the codebase. I have to try to filter it...

If the candle is long, crossing the teeth line can be very expensive. Theoretically with stops this can be avoided, if of course such situations occur often. But here again it is a question of optimizing the size of this stop.
 
ZZZEROXXX:

If the candlestick is long, crossing the tooth line can be very expensive. Theoretically, with stops this can be avoided, if such situations occur frequently, of course. But here again it is a question of optimizing the size of this stop.


It is clear - the initial task was to do everything according to the book, so that there would be no questions afterwards - from this, as they say, to dance, and only then - to roll different filters and all the rest...

Regarding stops - he says the price may several times "test" the level of the teeth line, let's say we are in longs - the price at the close of next candles several times breaks the alligator's teeth line from top to bottom by n points, but it closes above it, we keep the longs until the close of the candle will not be lower... This is what I have implemented. Then you have to see for yourself...

 
Roman, can you post your EA here? I will take it as a benchmark since it is entirely by Williams and try to improve it.
 
ZZZEROXXX:
Roman, you may post your Expert Advisor here. I will take it as a reference since it is entirely by Williams and will try to improve it.


I will try to improve it. Now the holidays are over, I will recommend it more properly and I will post it in this thread one day, it contains a lot of unnecessary things, which were left from my other studies...

I watched the work of the owl using three screens of Elder and one of the items of the task was to search for alligator, fractals and parabolic sar - but in the end - three screens were put aside for now and a "comrade" by B. Williams was obtained.

When I wrote the code, I "hit" it straight away and directly (when passing different questions about one or another dimension). Later I realized that I could have solved this problem in a different (more optimal) way, so the code is far from being optimal :-))). The structure of the Expert Advisor itself is from the tutorial.

 
ZZZEROXXX:
Roman, you can post your EA here. I will take it as a reference since it is entirely by Williams and will try to improve it.


B. Williams' EA in five dimensions - a working version (with control of opening a new bar) - is made from the code for the three screens of A. Elder, so do not pay attention to the code sections where the variables and the trailing market order on two APR are involved, as well as variables and calculations of SL and TP levels - in functions (include) - variables, tral_stop.mqh, orn_ord.mqh, besides the function and indicator are not fully used in the working version, instead, in the visualization mode when working "by candlesticks" through F12 - by steps (and not only), in the "log" tab window of the strategy tester, it is possible to see what function is doing (opening and setting an order by which measurement and the values of the variables significant for that event (analogous to the inform - I have bound the trading functions work)), also the function t_trend_period responsible for the "higher" screen in the three Elder screens is not yet activated - all according to the book by B. Williams for starters.Williams' book.

In general, the strategy proposed by B. Williams needs improvement, that's why we left out the commented parts of the code, including "everything else...", because.., Probably some of it will be needed to improve it - for example, to use this strategy on H1, H4 inside of some "older" filter (say, ADX on D1, by the way, its calculation is present in Criterion.mqh, based on data from t_trend_period), that determines the global trend ... I'm getting closer to research in this direction myself. The structure of the Expert Advisor is modular, according to the textbook. Perhaps someone will want to improve the proposed version of the owl according to five B.Williams' dimensions and share the methods (not necessarily in the form of a code) and the results. The trading system is good at catching all trends and working them off and on - see the video in the attached files, post above, but at the same time, at flat is slow ... in a word, you need to "fine-tune".

P.S. The code is not optimal in writing, the questions of compiling algorithms for defining trading criteria, and their translation into the code, I've solved "directly", so you can leave the criticism to yourself, however, I will take into account specific ways to improve the system performance.

P.P.S. The attached file consists of the archive of the folder experts, which contains folders include and indicators, as well as the Expert Advisor itself. After unzipping, place the contents of the folders in the same folders of your client terminal and go.

Files:
experts.rar  68 kb
 
Roman.:


B.Williams Five Dimension Expert Advisor - working version (with control of new bar opening)


Thank you, I will try it and if something happens I will post the result here.
 

Afternoon! I have recently started to get acquainted with Williams' book New Trading Dimensions, I got to page 5. I decided to build an EA to better understand the gist, of course without expecting any income.

I would not trade, Alert("buy", GetLastError()) does not write, I wrote to Any Novice Question and they forwarded me here.

And it is a cool addition to the script!

Look at the robot if you can.

//+------------------------------------------------------------------+
//| Aligatorny.mq4 |
//| Copyright © 2011, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, MetaQuotes Software Corp.
#property link "http://www.metaquotes.net"
extern int jaw_period=13,teeth_period=8,jaw_shift=8,tteeth_period=5,teeth_shift=5,lips_period=3,lips_shift=3;
extern double volume=0.1,stoploss=20,takeprofit=50;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialisation function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int tiket;
int start()
{double blu,red,grin;
//----
blu= iAlligator( 0, 0, jaw_period, jaw_shift, tteeth_period, teeth_shift, lips_period, lips_shift, MODE_SMA,PRICE_CLOSE,MODE_GATORJAW, 0) ;
red= iAlligator( 0, 0, jaw_period, jaw_shift, tteeth_period, teeth_shift, lips_period, lips_shift, MODE_SMA,PRICE_CLOSE,MODE_GATOREETH, 0) ;
grin= iAlligator( 0, 0, jaw_period, jaw_shift, tteeth_period, teeth_shift, lips_period, lips_shift, MODE_SMA,PRICE_CLOSE,MODE_GATORLIPS, 0) ;
//----


double Fractalu,Fractall;Fractalu=iFractals( 0, 0, MODE_UPPER, 0) ;Fractall=iFractals( 0, 0,MODE_LOWER, 0);


if (Fractalu>0&&Fractalu>blu&&&Fractalu>red&&Fractalu>grin&&grin>red>blu&&OrdersTotal() <1)
{ tiket= OrderSend( 0, OP_BUY, volume, Bid, Point*3, Bid- stoploss*Point, Bid+ takeprofit*Point, "Pose66", 1234567890, 0, Red);Alert("buy",GetLastError());}

if (Fractall>0&&Fractalu<blu&&Fractalu<red&&Fractalu<grin&grin<red<blu&&OrdersTotal() <1)


{ tiket= OrderSend( 0, OP_SELL, volume, Ask, Point*3, Ask+ stoploss*Point, Ask- takeprofit*Point, "Pose66", 1234567890, 0, Blue);Alert("sell",GetLastError());}




return(0);
}
//+------------------------------------------------------------------+

 
And here's a screenshot