The Holly grail of trading robots

 
Now let me make this clear. What I'm about to share is not the Holly grail. 

In my 2 years of trading, using indicator combinations, and learning different strategies. I've finally come to the réalisations that the fundamental force driving the markets is liquidity. It can further be broken down but at least you understand. 

Knowing this i asked myself how can I use this to make money and it's simple. Identify liquidity, market structure and your buying selling in a good place, which equates to a at least a profitable system. 

I'm starting this thread, so everyone can share make a contribution to the development of this system or at least improve it. 

It's a very simple approach not complex yet profitable. 


Here's the strategy

I'm not the best developer when it comes to mql5. 

But I'll try my best to write good code for this 

I'll make use of the zigzag indicator only 

Liquidity


Case Study; Sell 


assuming price is currently at point 0


1 verify if points 0 is a high or a low

2 Store the values of the last 10 zigzag points

3 define each high points in the array and the 

    lows points in the array


We need to store the price values of some points as it is 

important for future use

    * compare the lows (using price the y-axis) and get the lowest 

       price. Save the price into a double variable say lowestPricePoint

   ** Read the price value of point 0 and store that in a variable 

       say lastZeroPrice


Validating a sup or dem


4 using the highs only; check for the following;

    * using the price (y-axis), If the next point following a

       high point is less than the previous low point

       if true in any case, 1<3 3<5 5<7 7<9

   ** assign the price value of the high in step to a 

       variable say (entryArray) In this example point 4,6 will be 

       stored in our variable


       as we can see point 8 is technically a valid supply

       so we introduce a new check; if there is a consecuative lows,

       ie point 7>5 & 5>3 validate point 8 as a valid supply


       so our new variable (entryArray will have 4,6,8 price) as values


5 Now we have a valid supply, check (using price y-axis) if point 0 

    is greater than the value stored in the variable stored in 

    step 4 ** entryArray

6 Using bar control, if a candle close below any of the prices in 

    our variable array in step 4** entryArray open a sell trade.

7 Modify the sl and tp of the trade as follows

   first lets define a fixed variable say slBuffer (To accomodate spreads)

    sl = lastZeroPrice + slBuffer

    tp = lowestPricePoint


Risk Reward.

using this approach you can run into a situation where sl is > tp. 

We dont want that. 


Now we do a check before opening a trade. 


Find the difference

  * each price in entryArray - lastZeroPrice and the store 

     the value in a defined variable say slDifference

 ** lowestPricePoint - each price in entryArray store that in a

     variable say tpDifference

*** slDifference and tpDifference should have the same index numers

     Check for each index in the two arrays if 

     slDiffference > tpDiffernce. If the result if positive return a 

     boolean value of false else return true


using this check we can call it before opeing a trade in step 7

Positions SL and TP

Now you should have this the yellow lines are the entries, aqua line TP for all positions, SL is all above point 0

Case Study Buy

the reverse of the sell 



Please leave your comment below. Critique is highly welcome while I code the system into an expert advisor let's discuss 

What is a trend and is the market structure based on trend or flat?
What is a trend and is the market structure based on trend or flat?
  • www.mql5.com
Traders often talk about trends and flats but very few of them really understand what a trend/flat really is and even fewer are able to clearly explain these concepts. Discussing these basic terms is often beset by a solid set of prejudices and misconceptions. However, if we want to make profit, we need to understand the mathematical and logical meaning of these concepts. In this article, I will take a closer look at the essence of trend and flat, as well as try to define whether the market structure is based on trend, flat or something else. I will also consider the most optimal strategies for making profit on trend and flat markets.
 
Quantum Dev:

Please leave your comment below. Critique is highly welcome while I code the system into an expert advisor let's discuss 

Here's what I think... but take it with a grain of salt because you have to verify everything for yourself and come up with your own conclusions:

1) Understanding liquidity is important so you're on the right path. All markets exist to create liquidity and this is usually done by manipulating human emotions so if you can begin to understand how emotions are manipulated and how this has an impact on liquidity, you might become skilled at identifying profitable price action patterns that are common to all markets and know when they are worth trading.

2) There is no such thing as a holly grail robot. There can certainly be a benefit to building robots but I personally believe humans can do a better job since the markets are always a representation of human emotion which makes us better at understanding context. So you can try to build a robot and you might find success, but don't think there is a such a thing as a robot that will always have success in the market and be able to adapt to changing market conditions as well as you would be able to do it through your own analysis.

3) Personally, I think looking at liquidity is easier when part of a price action trading strategy based on a discretionary approach because it has a lot to do with human emotions and this is hard, if not impossible, to code in a robot. But that's just my opinion, so if you want to try to code a robot that can do it, I wish you good luck and great success!

 
Jeepack #:

Here's what I think... but take it with a grain of salt because you have to verify everything for yourself and come up with your own conclusions:

1) Understanding liquidity is important so you're on the right path. All markets exist to create liquidity and this is usually done by manipulating human emotions so if you can begin to understand how emotions are manipulated and how this has an impact on liquidity, you might become skilled at identifying profitable price action patterns that are common to all markets and know when they are worth trading.

2) There is no such thing as a holly grail robot. There can certainly be a benefit to building robots but I personally believe humans can do a better job since the markets are always a representation of human emotion which makes us better at understanding context. So you can try to build a robot and you might find success, but don't think there is a such a thing as a robot that will always have success in the market and be able to adapt to changing market conditions as well as you would be able to do it through your own analysis.

3) Personally, I think looking at liquidity is easier when part of a price action trading strategy based on a discretionary approach because it has a lot to do with human emotions and this is hard, if not impossible, to code in a robot. But that's just my opinion, so if you want to try to code a robot that can do it, I wish you good luck and great success!

Thank you for that perspective
It's much complicated to instruct machine to recognize patterns based on human emotions, as the emotions themselves are never fixed which means the types of patterns formed will also change. 

We're always be at a better position to make trading decisions. The question I ask myself is,  traders if not all have a repetitive set of patterns they go through to take a trade. This may not be true for all traders but for the most cases it's true. Then there is a potential for robots. 


I'll keep the thread updated as time goes 
 
I would like to tell you smth encouraging. Trading markets is a small world, all popular strategies are known. Nowadays quantpedia and encyclopedia of trading  strategies out there 

  • 4,000+ genuine methods to beat alpha 
  • can keep anyone entertained for centuries
  • each costs 5-cents on good day

Good robust "trading strategies" and respective algos do exist. You just need to always remember 2 key points

  • every public strategy and entire TA are created for traders to lose money
  • you have huge advantage over discretionary traders because you can run the backtest 

Never give up! If trading was easy - everyone would do it.  

 

holygrail

That was when the French guy dispatched the cow

 


I am afraid you have a few things wrong, i stopped reading when you said: As we can see point 8 is technically a valid supply. Point 8 is no where near a supply zone, who taught you this? was it YouTube? because the only time a supply or demand level is valid, is after a market cycle/phase is completed and the accumulated and distributed prices are neutralised, meaning after consolidated price enters, because that's the only time we can measure a level of supply or demand, and to do that, we need a technique as well. i am not sure about this strategy of yours. Just remember that 95%+ of traders bleed their accounts every day. The best would be to apply for enrolment at some trading institute around the world, and learn to do this professionally

 
Too much overcomplication. why would you even want to do all those silly conditions? Use a higher timeframe and work from there
 
Paket Jean Sebastien # :

Inilah yang saya pikirkan... tapi ambillah dengan hati-hati karena Anda harus memverifikasi semuanya sendiri dan menghasilkan kesimpulan Anda sendiri:

1) Memahami likuiditas itu penting agar Anda berada di jalur yang benar. Semua pasar yang ada untuk menciptakan likuiditas dan hal ini biasanya dilakukan dengan memanipulasi emosi manusia, jadi jika Anda dapat mulai memahami bagaimana emosi dimanipulasi dan bagaimana hal ini mempengaruhi likuiditas, Anda mungkin akan diaktifkan dalam mengidentifikasi pola aksi harga yang menguntungkan dan umum bagi semua pasar. pasar dan tahu kapan mereka layak untuk bertransaksi.

2) Tidak ada yang namanya robot holly grail. Memang ada manfaatnya dalam membuat robot, tetapi saya pribadi yakin manusia bisa melakukan pekerjaan dengan lebih baik karena pasar selalu mewakili emosi manusia sehingga membuat kita lebih memahami konteksnya. Jadi Anda bisa mencoba membuat robot dan Anda mungkin akan sukses, tapi jangan berpikir ada robot yang akan selalu sukses di pasar dan mampu beradaptasi dengan perubahan kondisi pasar sebaik Anda. dapat melakukannya melalui analisis Anda sendiri.

3) Secara pribadi, menurut saya melihat likuiditas lebih mudah ketika bagian dari strategi perdagangan aksi harga didasarkan pada pendekatan diskresi karena sangat berkaitan dengan emosi manusia dan ini sulit, bahkan tidak mungkin, untuk dikodekan dalam robot. Tapi itu hanya pendapat saya, jadi jika Anda ingin mencoba membuat kode robot yang bisa melakukannya, semoga sukses dan sukses besar!

I really like this statement because I now think like that and open up discourse to make it better to do manual learning

 
Thanks for sharing!