NexusFi: Find Your Edge


Home Menu

 





Attack of the Robots - An Algo Journal


Discussion in Trading Journals

Updated
      Top Posters
    1. looks_one vmodus with 357 posts (859 thanks)
    2. looks_two SMCJB with 38 posts (84 thanks)
    3. looks_3 kevinkdog with 27 posts (70 thanks)
    4. looks_4 bobwest with 13 posts (53 thanks)
      Best Posters
    1. looks_one bobwest with 4.1 thanks per post
    2. looks_two kevinkdog with 2.6 thanks per post
    3. looks_3 vmodus with 2.4 thanks per post
    4. looks_4 SMCJB with 2.2 thanks per post
    1. trending_up 94,155 views
    2. thumb_up 1,141 thanks given
    3. group 61 followers
    1. forum 478 posts
    2. attach_file 181 attachments




 
Search this Thread

Attack of the Robots - An Algo Journal

  #261 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853

Sorry, there was no journal entries last week, because I am doing almost nothing with trading. This week will be about the same. I should return to regular journaling next week, once the smoke of client work and homeschooling clears.

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Quantum physics & Trading dynamics
The Elite Circle
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
 
  #262 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853

Well, not much happening yet this week. I am wrapping up one more big deliverable for a client this week and should be back to trading and algo development by the end of the week.

The one thing that I want to focus on is the use of Bill William's alligator and fractals together. I have three of his books (Trading Chaos 1 and 2 ed., New Trading Dimensions). I can see why his books seem to polarize people. I do not read any of the trading psychology or quantum mechanics, etc, etc, mainly because I go right to the meat of the content. There are some very solid concepts, but I don't think the presentation is great and things are not always well explained or defined. For example, the term 'Balance Line' is used quite often, but may refer to any of the three alligator lines and he is not clear about which balance line to use for a particular method. I am trying to build my own 'unified theory' of how to use his various methods and tools to come up with trading.

On the surface the alligator is simply three smoothed moving averages based on bar lengths of three Fibonacci sequence numbers: 13, 8, and 5, offset by 8, 5 and 3 bars respectively (also Fibonacci sequence numbers). The use of Fibonacci sequence numbers is based on their own analysis and finding that these are significant with respect to price movement. If you are a number theorist or physicist, this probably appeals to you and you probably agree with Williams. I am neither, but I will go along for the ride. The alligator is a special kind of 3-line moving average, and let's leave it at that.

The fractals are essentially highest highs or lowest lows (highly simplified explanation) with two bars on either side, offset by one small point/pip/tick (+1 long/-1 short). I'm not sure fractal is a mathematically correct term for this, but again, I'm along for the ride.

Alligator and Fractal


So this is what I am looking at right now. I have Williams' Awesome Oscillator and Ehler's Even Better Sinewave, just for reference. The Awesome Oscillator (AO) is less than awesome in consolidation, but as I think I noted from earlier testing and analysis, AO is not a stand-alone tool.

The above chart is the MES 30 minute chart, but I like how this looks for Silver, too. Once I can do some more manual analysis, then maybe I can code it to see what I can come up with.

That is all for now. I hope to have another update Thursday.

Stay safe out there!

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #263 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853



vmodus View Post
Alligator and Fractal

I want to clarify one thing on my chart. The alligator's 'mouth' is open when the red line is between the blue and green lines. That is when the alligator feeds and you are supposed to take trades.

That's all.

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #264 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853

I want to trade!

I have been very busy with client work, busier than I want to be, so I really have had no time to do much in the way of system development. To save time, I will just say have a great weekend to all and I will return to this journal Tuesday after the US Memorial Day holiday.

As always, stay safe!

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #265 (permalink)
 kanepa 
philadelphia pa
 
Experience: Intermediate
Platform: ninja
Broker: NinjaTrader Brokerage
Trading: es
Posts: 202 since Jul 2017
Thanks Given: 348
Thanks Received: 409

Hi. Thank you for your journal.

Bill William's books. I have read it a long time ago. Also tested his methods using different instruments. If I remember correctly, method only worked for trending stocks and futures. Didnt he also use many 90s stocks as example in his first book where market had rallying?

It was interesting concept to apply chaos theory but my findings were unsuccessful. Just sharing and hope you can come up with better result than I did.

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #266 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


kanepa View Post
Hi. Thank you for your journal.

Bill William's books. I have read it a long time ago. Also tested his methods using different instruments. If I remember correctly, method only worked for trending stocks and futures. Didnt he also use many 90s stocks as example in his first book where market had rallying?

It was interesting concept to apply chaos theory but my findings were unsuccessful. Just sharing and hope you can come up with better result than I did.

Thank you for your kind words. William's last book, Trading Chaos 2nd Edition, was co-authored with his daughter and published in 2004. I don't really consider it a second edition, but a continuation of his ideas. I don't really focus on the philosophical or meta-physical aspects of his writings, but jump right into the meat of it.

We have been able to integrate some of his ideas into our trading, most notably fractals. I have a number of trading ideas based on Williams' concepts for algo strategy development that are currently backlogged. The next thing I will get to is alligator + fractals, as I noted in one of my most recent posts.

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #267 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853

I'm back!

I have been sitting on this entry for a couple months, since the April 2020 issue of TASC was published. The article On-Balance Volume Modified (OBVM) caught my eye, as it was exactly what I was trying to do when I developed my On-Balance Volume SuperSmooth back in January (see: . The main idea we both had was to smooth the OBV and indicate market direction change.

The article uses two lines, but I actually like to use a single changing line because it is easier to see change, so I modified their code so that I could compare with my smoothed OBV. Here are the results on a 60 minute silver chart, using similar parameters (7 bars, red=bear; yellow = bull):



In this chart, the OBVM produces fewer signals and it seems to detect changes one bar earlier. The trade-off is some chop.

What's the point?
There are several points. Firstly, I found it interesting that someone else was thinking about smoothing OBV as I did (different methods, but same idea). Secondly, it is useful to compare and contrast similar analysis methods. I will probably compare trading results of these two indicators to see if one performs better than other (simple crossover entries) over a longer term.

If you subscribe to TASC, you can find the code to OBVM here (April 2020; Trader's Tips): Back Issue Archive

~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~

That's all I have for now. I have a Strategy Club submission to finish up (Natural Gas) today and transitioning from client work back to trading.

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #268 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853

I have been extra busy trying to code my latest strategy idea and see if it is feasible and will pass our Strategy Factory process. The big idea, which I have touched on in prior posts, is using fractals for counter-trend trades, reversals, or breakouts.

The rules are: if price touches a fractal high and the alligator is below the fractal high, then take a long position. Opposite for short positions (using fractal low).

Coding it was tricky, since the Alligator is offset 8, 5, and 3 bars into the future. Rather than trying to explain it, Sierra Charts shows the projected bars in the future (and I'm not sure they have it properly implemented, but that is not our concern here):

Alligator on Sierra Charts - Future Bars


I made the mistake, as some others before me, in thinking that the Alligator was simply three smoothed moving averages. The offset is what makes this a unique indicator. It took me a while to wrap my head around how to code it, but it ended up being pretty easy when I put pencil to paper (literally).

I have been using a silver chart for development purposes, and below is what I expect the strategy to do:


I was able to watch the short position unfold perfectly as I was coding (I was actually looking at a tick chart, but the 60 minute chart shows the same basic move). I had to resist the temptation to trade this and stick to developing the strategy. Anyhow, the fractals are used for classic support and resistance, with some reinforcement using the Alligator to avoid some bad trades.

I am not sure what will come of this in the end, but almost everywhere I apply this concept (manually), it seems to work well. I have the long side coded and functioning perfectly, but the short side is not taking trades. I should have that worked out later today.

~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~

Strategy Factory Club
We submitted a new strategy to the club for June, a natural gas strategy. We skipped the May submission, as the strategy we developed did not pass the criteria for entry. We have our April heating oil strategy that tanked the first month, due mainly to the bottoming of the oil market. It has made a nice recovery since then, so we shall see if it ultimately passes the six month test.

The main purpose for submitting to the club, for us, is not getting strategies from others (assuming we pass), but the exercise and discipline of developing, testing, and incubating strategies. We have learned a ton about the process from Kevin Davey just by participating. Hopefully our process (a modified version of Kevin's) is solid and continues to mature as we use it.

~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~

That's it for today! Happy trading all and stay safe (in every way).

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #269 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


vmodus View Post
Strategy Factory Club
We have our April heating oil strategy that tanked the first month, due mainly to the bottoming of the oil market. It has made a nice recovery since then, so we shall see if it ultimately passes the six month test.

Correction: our April strategy is crude light, not heating oil. I was confusing with a heating oil strategy we developed at about the same time.

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #270 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


I was able to finally get the strategy I coded, as I described yesterday. So there is good news and bad news.

The Bad News
It did not perform very well. Pictures are more poignant than words, so here is and equity curve for Silver, 1024 tick bar, from Dec 9 2019 - Jan 31 2019:



It does not look good in nearly any timeframe or tick chart. ES, SI, and EC (Euro FX) all have similar outcomes. I only have two possible parameters to optimize, but really only one practical parameter (stop loss). I would be tempted to start fiddling with the strategy, but I fear curve fitting.

One additional thing that I don't like is that the efficiency (a measure of exits) runs at about -25%. That is, as we say, butt-ugly. We like to have our efficiency at over 10%. 100% efficiency would be getting out at every top or bottom. This is what YM looks like for a 2 year period, 60 minute chart:




The Good News
There are several pieces of good news:
  1. It works!
  2. The fractal calculations I used are not 100% accurate; I noticed that several were incorrect, which affects the performance. I can fix and retest, though I don't think it will help that much.
  3. I was able to get my stop orders working, at least for backtesting; this is hugely important to me for fractal work.
  4. All entries and exits are accurate.
  5. I have a baseline for the other fractal and alligator ideas I want to try.
So I have a great starting point for the other fractal work. This was one idea and it works well sometimes and leaks money at other times.

Next steps:
  • Fix the fractal calculation
  • Scrap this idea, document results, and move to the next idea

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on March 31, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts