Home › Forums › Development › Trading Systems – Development › Develop an EA using the TZ/RZ theory
Tagged: TZ EA
- This topic has 32 replies, 8 voices, and was last updated 7 years, 3 months ago by
forexeasy.
-
AuthorPosts
-
[ tradeforlife1 ]December 6, 2014 at 8:02 pm #534
Hi friends,
I am thinking of developing an EA that uses the concept of Transient Zone / Recurrent Zone. I am not sure whether it can be done but i’m giving it a go so that experienced people here could help me out if that is possible.
Also if we have more brains behind this, then we will have more ideas coming out and maybe that would take us closer to the GOAL.
Current approach:
The current EA will create a trade when there is a PTZ created (when Lower PTZ, BUY trade created and during Top PTZ a SELL trade is created).
If there is a new PTZ in the same side making the previous PTZ recurrent, close the current trade and create another one same as previous one but at the new price.
We are sure that the price moves away from the current PTZ making it confirmed TZ at one point of time and we will come out of the trade once we touches the fractal line (K’s recurrent transient indicator line) at the opposite side.
Or we will close the trade when there is a new PTZ created at the opposite side. we have used the K’s Recurrent Statistic indicator for this EA.
Status on backtest:
Currently it is backtested in 1 hour time frame with H=30 and it will never make a profit as we are creating more number of trades for all PTZ that become recurrent. and only in some cases, the PTZ become confirmed TZ and we get a good trade.
To DO:
If we can come up with an approach to reduce the trades that are created for these PTZ’s that become recurrent, then could move into profits.
Any suggestions, ideas, thoughts are much appreciated.
I have attached the EA for review and usage.
-
This topic was modified 8 years, 3 months ago by
tradeforlife1.
Attachments:
You must be logged in to view attached files.Hi My Friend, Great Idea..
Maybe you need to use channel indicators as ‘filter’ like BB or Donchian Channel..
Also need some research in relation with ‘after effect’, meaning that immediately when PTZ become CTZ (Confirmed TZ), what is the main direction of next several bars within the length of TZ wing (h size).. especially for PTZ that show up ‘outside’ channel filter.
Once again congratulation for this Great Idea
Have a nice Weekend and best regards
MTH
Intuition, Experiences and Common sense..
http://www.binaryoptionsedge.com/Hi Traderforlife1,
I have been working on an EA that does the opposite. Since 97 percent of PTZ get closed I am trying to figure out how to make an EA that picks the right time/pips away from start of PTZ to trade back to it. Did some work with stuff i saw on the sim thread such as PTZ outside of BB and I have my own ideas about momentum with moving avg. but I still need to work on it. And I work 60+ hr a week. Spent Thanksgiving day learning about alerts and putting rectangles on the screen and still didn’t have time to get much into the “hybrid” EA I am working on to alert me when I should be looking for that return to the PTZ so i can trade it manually.
I will study how you use iCustom with Recurrence Statistics as that was one of the things i wanted to learn about. I have been programming various languages since 1978 but the devil is in the details as far as getting anything useful.
So here is what I got so far. When it sees a PTZ on daily it looks on hourly for BB extreme and makes a trade. This one has winning streaks and losing streaks through out the year on backtest so it isnt profitable as is but i think it has a lot of potential if anyone wants to improve it. In fact this one is worse than one without BB slope filters that added, but I give this one as it seems like it has more potential to tweak into a winner.
Even though our approaches are opposite I think we can both learn something from the others EA.
Ken
Attachments:
You must be logged in to view attached files.[ tradeforlife1 ]December 6, 2014 at 8:56 pm #543Thanks a lot Kiads for taking time to go through the thread and giving some valuable ideas… I will definitely go through it and come back to you with more questions/information
After I posted Kiads post was there and reminded me that I also have a time filter in there to control the window where the trade can be made, but I think this will have to be changing with “wave length” of the market to be effective. Maybe a moving avg. of the time between the last three TZ tops for sells and bottoms for buys. Another project on my to do list.
Ken
Hi Tradeforlife1
Good idea, always been my initiative but I am not a coder. One idea to execute the trade is af
<p style=”display: inline !important;”>ter a TZ formed, user able to input a number target h as target bar to enter trade whatever price it is. Iinclude a SL and TP with that trade.</p>
<p style=”display: inline !important;”></p>
<p style=”display: inline !important;”></p>
<p style=”display: inline !important;”>scissors</p>
<p style=”display: inline !important;”></p>
<p style=”display: inline !important;”>A noob as usual</p>[ tradeforlife1 ]December 6, 2014 at 9:01 pm #546Thanks Kenergy for the wonderful information you have provided. your idea was good as if trade using RZ then there will be more trades than trades with TZ. As you told, we can work together so that it would help to come up with some good idea in future maybe.
Note- As of now, i was able to successfully retrieve only the values for Up and Dn fractal line values from Recurrent Statistic indi. I am still working on to bring in the values of upper PTZ and lower PTZ into EA. But i have some conditions in my EA which works same as them, so as of now, no issue.
-
This reply was modified 8 years, 3 months ago by
tradeforlife1.
Hi Traderforlife1, I have been working on an EA that does the opposite. Since 97 percent of PTZ get closed I am trying to figure out how to make an EA that picks the right time/pips away from start of PTZ to trade back to it. Did some work with stuff i saw on the sim thread such as PTZ outside of BB and I have my own ideas about momentum with moving avg. but I still need to work on it. And I work 60+ hr a week. Spent Thanksgiving day learning about alerts and putting rectangles on the screen and still didn’t have time to get much into the “hybrid” EA I am working on to alert me when I should be looking for that return to the PTZ so i can trade it manually. I will study how you use iCustom with Recurrence Statistics as that was one of the things i wanted to learn about. I have been programming various languages since 1978 but the devil is in the details as far as getting anything useful. So here is what I got so far. When it sees a PTZ on daily it looks on hourly for BB extreme and makes a trade. This one has winning streaks and losing streaks through out the year on backtest so it isnt profitable as is but i think it has a lot of potential if anyone wants to improve it. In fact this one is worse than one without BB slope filters that added, but I give this one as it seems like it has more potential to tweak into a winner. Even though our approaches are opposite I think we can both learn something from the others EA. Ken
Hi Ken,
First please forgive me, I am not a coder but I am a trader and I follow Kiads and through this have found the transuient zones indi etc. One method I have paid attention to is the use of cumulative delta to look for divergence from price action. I have not been able to find one for MT4 that works like the one a trader friend has from Sierra charts I think it is? I have looked at a number of delta indi’s for MT4 but none give a good indication like this one where it prints the volume inside the bar. I have attached 3 screen shots that show divergence #1 is price action at a top edge level (underlined with green line) which most likely would have formed a PTZ, the second shows delta pushing higher for the same period creating divergence and then the break to the sell side. The third shows the chart snaps together. In it you can see a big delta bar up with price following into what may well be a PTZ and then later this is followed by two up bars where price is forced down giving a hint that there is strong sell limits at the top of this zone. My thought is that if we were to be able to flag these types of behaviour inside or at a PTZ then we have a strong indicator that price will move away from the top or bottom edge when that occurs depending on where the zone forms. The image snap is either a top edge or a balance area as price moved up to it (so it could not be a bottom edge). I apologize for the poor quality of the graphics but I am sure it will give you the general idea and hopefully some food for thought.
cheers
maahome
-
This reply was modified 8 years, 3 months ago by
maahome. Reason: increase graphics
Attachments:
You must be logged in to view attached files.[ tradeforlife1 ]December 6, 2014 at 9:27 pm #556Hi Scissors, I am trying to understand what you told. are you saying that we will wait for a confirmed TZ and then enter the trade after user inputted H bars?
Haha I thought my message is ridiculous thats y corrupted.
Yes what you are saying is what i would like for.
Hi maahome,
Try to make bigger screen.
Cant really see the charts, will look into delta if I get time.
Ken
-
This reply was modified 8 years, 3 months ago by
KENERGY.
Hi Tradeforlife
The reason why I need that capability is because I am testing one of my tz method in swing trading. My current tf is m15 and using h to be 96. When a tz formed, I would wait for h to be 48 (which is 12 hours later or 50% of unconfirm right wing tz) and enter the opposite trade with tp 100pips and no sl. Currently able to win 5 in a rows and have just tested this method last week. Will continue this method coming weeks. But there is a catch:
1) enter trades have to wait and might be in the wee hours where we are off screen
2) need to judge the h 48 for any breakage of cuurent unconfirm tz and form a new unconfirm tz. If new one is form we have to wait another h48 again. Will be quite tiring if not auto.
Just my method no gurantee, comments welcome
Scissors
Just tried a post but dont see it. sorry if it gets doubled.
Hi scissors,
My EA has TZ detector and timer already in it, but I have many ideas to try already so unless someone else wants to modify my EA it will be awhile before I can do it.
Do you mean 48 bars after the left half forms or after a complete TZ forms?
You may be able to use this while manually tracking it for SL, but we cant use the EA for back testing without a SL as it will almost surely get a trend change in the middle of a trade and run against you for weeks and thousands of pips. Hell that happens sometimes even when I code a SL into every trade. It expires or something.
Ken
Hi maahome, Try to make bigger screen. Cant really see the charts, will look into delta if I get time. Ken
Hi Ken,
I have blown up the shots but they are fuzzy because they are from a video capture ( I do not have the delta software). If you click the image they are now twice the original size.
Thanks
maahome
Hi Ken
Yes after 48 bars of the left half form. Possible to share EA for evaluation? I have tried to analyze the unconfirm tz in percentage of completion (eg 20%,30%, etc) but still find that 50% is still the best to determine a shift of next trend for tz.
Too bad I am working as full time, cannot keep track of eurusd whenever I am. As I am not full time trader. Need the help of gurus here to learn more ideas to improve my understanding of fx.
Scissors
[ tradeforlife1 ]December 7, 2014 at 7:06 am #643Hi Scissors,
This looks like a sound strategy and thanks for sharing your great ideas here with us and to form a part of the team.
If i understand correctly your idea,
1. Set the H=96 in M15 timeframe. Wait for a PTZ to be created. (PTZ will be created when the left side 96 bars are complete and the focus bar is complete).
2. Now, wait for the next 48 right bars (right side to the focus or middle bar) to be completed. If there is no PTZ created again within these bars, then this is the right time to enter the trade.
3. Enter the opposite trade as price will move away from the PTZ making it Transient.
If my above understanding is correct, I have few questions here:
1. How do you know the TP is always 100 pips? Do we need to have an exit strategy (rule or condition) here for EA? my suggestion would be to check if the price crosses the RS indi’s opposite fractal line.
2. There are chances for PTZ to happen even after right 48 bars are created. So there we will fail.
3. If the left side of PTZ is not recurrent, there are high chances for the price to retrace back to the PTZ (but still the PTZ will become confirmed TZ as it won’t crosses it). we need to avoid these type of situations.
Overall, this looks like a good idea which I am planning to add in my EA. I will let you all know once it is done.
scissors, the third post in this thread has the EA I would modify to follow your system. It has a counter from the last center bar and simple tests before entry that could be modified for your entry.
tradeforlife1, maybe the entry in my EA, after the 3 bar MA turns in your favor, then a trailing stop instead or as well as, a 100pip TP.
Ken
[ tradeforlife1 ]December 7, 2014 at 3:24 pm #700Hi Friends,
I have modified my EA a bit now that it reduced the number of failure trades and I can see a profit when i backtest for last one month for EURUSD
Additions:
As per Scissors idea, I am now checking for next 48 bars after a PTZ. and then enter the trade and close the trade based on SL set or TP set or when the current price meets the fractal line of K’s RS indi.
I have attached the latest EA here. Please have a look and give me your suggestions. I have been working on this the whole day today
Attachments:
You must be logged in to view attached files.[ tradeforlife1 ]December 7, 2014 at 3:26 pm #704Here is the summary report of the backtest done for last one month for EURUSD using the EA.
When the SL and TP were not set, then most of the trades were winners in a ranging market but in trending market, there will be huge drawdown, hence i set the SL and TP and tried it out
-
This reply was modified 8 years, 3 months ago by
tradeforlife1.
Attachments:
You must be logged in to view attached files.Hi all,
Really you guys have the time to backtest, today is Monday and I have to go back to work, hope have time to know more positive results from you guys!! Thanks for the hard work, never knew my testing method you all would be interested, keep adding more innovative ideas to this method, cheers!
To answer the following questions:
1. How do you know the TP is always 100 pips? Do we need to have an exit strategy (rule or condition) here for EA? my suggestion would be to check if the price crosses the RS indi’s opposite fractal line.
(There is no gurantee of 100pips, I use it because that pip should be quite reasonable when there is a swing, sometimes not sure quite coincident it is always near some potential news outbreak. If play safe, we can have a SL of 50pips)
2. There are chances for PTZ to happen even after right 48 bars are created. So there we will fail.
(Yes, thats what I have put in one of the setback in my post. That is where at the point of 48 bars we need to come in and made a judgement on the PA manually, which I am still thinking of the conditions to make a decision. One idea is to pull in Skull/Star indicator to do a decision for us by looking at >M15 TF. Might need a help from you all on the backtesting.)
3. If the left side of PTZ is not recurrent, there are high chances for the price to retrace back to the PTZ (but still the PTZ will become confirmed TZ as it won’t crosses it). we need to avoid these type of situations.
(Yes, after 48 bars the PTZ can be more or less recurrent. Any “not recurrent” PTZ scenerios will appear before 48bars, thats what I usually see)
Do take note this is in high risk testing, not recommend for real trade, I am still thinking of the conditions.
Scissors
8 Dec 14 (My local time at GMT +8)
PTF Observed: Bottom PTF @ 5 Dec 2245
Open Trade: @ 8 Dec 1045
Process: PA did not go up and instead went down and break the cuurent PTF to form a new bottom PTF @ 9 Dec 0100.
P/L: Close @ 9 Dec 0700 and profit 100pips.
Max Drawdown: -435pips
Conclusion: Advise to see the overall sentiment trends, more confident to sell rather then buy. Should have wait more than 50% (eg 80%) to decide the buy trade since the overall sentiment is sell.
I will study how you use iCustom with Recurrence Statistics
First of all, I don’t believe that calling Recurrence Statistics (at least the versions I do know by now) will supply a signal that can directly be used for trading.
Second, if you do so, please be aware that the versions up to V4.2 of Recurrence Statistics contain a serious bug. This has been fixed in V4.3. If you use it, please refer to this one or a later version. Probabilities for mid-bar transient zones have changed dramatically in V4.3.
Regards, simplex
A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)
I have been programming various languages since 1978 but the devil is in the details
Yes, man, I think I know what you’re talking about. I started by punching FORTRAN 77 code in paper cards – 72 characters per card. OO features of MQL4 are still a mystery to me!
Since 97 percent of PTZ get closed …
Are you sure about that? As far as I understand this by now (still learning, though) this 97 % probability only relates to those special trades depending on your particular choice of that mysterious k variable. If you choose k so that you’re only taking a small fraction of your PTZ as a potential profit you may gain those 97 %+. If you choose the complete PTZ as a potential profit then your hit probabilities is mostly around 80 % – depending on symbol, timeframe, and your choice of the h interval.
Do you have the same understanding?
Cheers, simplex
A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)
Yes Simplex, you are right , once a zone is Identified as PTZ the solve rate is far lower if the H is constant on both sides. There are however, h values that may not be practical to trade that yield 97% solved. Try EURUSD H1 at H=144 for example. I stumbled across this while trying to do H=6 on daily (6days*24HRS=144) and trade in H1 with an EA.
Fortran on cards!!!
Honeywell Multics: 150 terminals with 15MB ram and a stack of 8 inch floppies to support it. 1980
Thanks for the reminder about V4.3 but i am not looking at those stats at this point.
Ken
Honeywell Multics: 150 terminals with 15MB ram and a stack of 8 inch floppies to support it. 1980
Hehe – sounds nice! But sitting in a small room with two dozen students, each one of them punching his homework in an IBM card puncher – this is the real thing!
Some of us even tried ear protectors to get rid of the noise!
Why not start MQL4 on cards? Would look like this:
Attachments:
You must be logged in to view attached files.A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)
-
This topic was modified 8 years, 3 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.