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 93,456 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

  #201 (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 am going to add a little clarity to how ATR would have improved my stops last Friday. I had a set stop loss of $300 per contract, for both ES and RTY. A string of 3 stops in a row for ES left me at -$900, wiping out some earlier profits and sinking me into the red. Another stop over on RTY cost another -$300.

Now, introducing ATR, I ended up with three stops:
  • ES: 75, 125 100
  • RTY: 87.50
...for a total of $387.50. Compared to $1200, that is significantly better.

That is all for now, have a great day trading!

~vmodus

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

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #202 (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

Someone asked for the EasyLanguage code. Here is what I have, with the following assumptions:
  • ATR length = 14 bars
  • Multiplier = 3
 
Code
vars: 
   ATRValue(0) ;

ATRValue = AvgTrueRange(14) ; 

SetStoploss(ATRValue * 3 * BigPointValue) ;
You may need to adjust your code depending upon what instrument you use, but this is what I use for index futures. Use at your own risk and discretion.

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #203 (permalink)
KatnissE
Newark, DE
 
Posts: 2 since Jan 2020
Thanks Given: 16
Thanks Received: 4


Thank you! That's very helpful.

Reply With Quote
Thanked by:
  #204 (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, I have made it to Wednesday evening without losing my mind. I got the majority of my client work completed (still have to travel tomorrow) and was able to focus on some trading activities.

The range bar strategy has been a pain to test. It has had some spectacular wins, and slow agonizing drawdowns. Of course, I am running this over 23 hour sessions, for data collection, so none of these results are real. This is starting to be extremely laborious to test and gather data. I think for this next cycle I will just run this on ES only, as both RTY and ES together are making my head spin.

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

ADX and ADX Again
We have be working to get a strategy that we believe would pass the Strategy Factory Club criteria for entry. We had one strategy that was very promising, but totally failed in two of the walkforward periods, so we had to scrap that. My partner has been working on a couple of other strategies which we hope to submit.

I was listening to the Better System Trader podcast last week (thanks @SMCJB for the recommendation!) and @kevinkdog was discussing entries and exits, and mentioned one of his latest books. So I bought it from Amazon for $2.99 (Kindle version) and started looking at some of the entries (I later found out that I already had that book from the Strategy Factory tuition... duh). His intraday strategy (#7) caught my eye, so I started working on that a little bit. I have been toying with ADX for about a month or so, but have not integrated into any strategy. This led me to some additional research on ADX, and realized that I have a use for it as an entry (not as Kevin describes).

So I spent a little time analyzing it for use with a custom OBV indicator that I developed (OBV SuperSmooth, I call it). Combining the two for entry and exit signals has some promising results on NQ and RTY, when looking at a sample of about 50 trades. I haven't coded it yet because I have not even documented it yet. I have two ways to trade this and it looks good for indexes thus far, but I haven't figured out entries, so I will fork those into two separate ideas and see where it leads.

Back to the #7 entry I mentioned above, I plugged it into one of my existing strategies that had a pretty lame entry, to see if it would improve (I like my exit, for the most part). It did poorly on RTY, but surprisingly well on NQ. I am testing different timeframes and it is really just an idea, since I was just plug-and-playing the entry. It has some promise.

As a side note, I recommend the book I just got: Entry and Exit Confessions of a Champion Trader: 52 Ways A Professional Speculator Gets In And Out Of The Stock, Futures And Forex Markets . For $2.99 Kindle version (or free if you have Kindle Unlimited), you can't beat it. Just more ideas for our trading.

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

The rest of the week
Tomorrow I will probably just have my range bar strategy collecting data, as I will be away from my office for a good part of the day. I am starting to see this strategy as high hanging fruit, and maybe one that I do not have the time to climb and pick. I will decide by Friday if I want to try this in micro e-mini ES (MES) next week.

I also have to catch up on my documentation and recording results of the various tests I have been doing.


See you all Friday!

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #205 (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 had about 2 hours after I got back from traveling to code two system ideas I had yesterday, and perform some feasibility testing. The big idea is that we let ADX sit below 25 for a long time (~30 bars), and when it breaks out, go in the direction of the trend

Idea 1:
  • ADX entry (>25 only after being under 25 for n number of bars)
  • OBV for direction (my custom OBV)
  • OBV for exit
  • ATR for stop loss
  • Do not trade during NYSE open (925-1030)
  • Index futures, 5 minute charts
This one failed feasibility testing, but that's okay. It actually might work on longer timeframes and different markets (30 min or greater).

Idea 2: same as above, but...
  • ADX crossover for exit
This one did a lot better and passed feasibility testing. So now on to some backtesting, etc. I have not had much to show in the way of images (data is boring), but here is Idea 2 in action:


The trades are not market beaters and usually get into the trend late, but the idea has some utility. The trade on the left was worth about $325 and the right about $125 after commission and slippage. I'm not completely comfortable with the OBV direction, which sometimes give a false trend (it lags), so if it fails too often, I may go with a trend from last few bars. But that is another idea.

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

During my 4 hours of driving today, I gave some thought to my chart trading brothers and sisters, as I listened to the Better Systems Trader podcast. It occurred to me that we are all systems traders, automated, or manual, if we are following a set of rules for our trading and not just beating entries on a keyboard. Anyhow, just a thought.

See you all tomorrow!

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #206 (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

Let's panic.

But seriously. I fired up TradeStation last night, and saw the gap down on ES and NQ at the open. I am not surprised. I watch a bit of soccer/football, so seeing several matches in Italy (Serie A) cancelled due to COVID-19, I was not surprised.

The reason I worked last night is that I have been working on an idea that may prove difficult to code, so I am going through a manual analysis. The main thing I am looking at doing is using ADX, iTrend and a custom OBV indicator to give me only the best entries.

The Big Bar Problem
"Sometimes you eat the bar; sometimes the bar eats you."
So I have a big bar problem:
  1. When we experience the big bars, indicators based on price have trouble recovering.
  2. After a little while, we settle into a range or channel
  3. The distance of the indicator from the prices indicate that the indicator is still affected by the earlier price action
  4. As such, a later crossover is delayed by at least one bar
After a ton of analysis on the 'Big 4' US equities index futures, I see that this is one of the main weaknesses of my system. I do not adequately compensate for a bar that is n number of standard deviations from the mean H/L or HLC price (or any combination therein). Any decision making, i.e. rule that I have coded into my strategy/algorithm, is bound to have a bunch of these failings.

For now, I am working on a solution for this: if a big bar happens, then wait about 14 bars for the indicator to normalize before trading again. What makes a big bar? I will figure that out, maybe using a standard deviation calculation.

I don't know if I can or want to code this into a strategy. There is a risk of creating too many rules, or heaven forbid, curve fitting. The simplest models tend to be the best models, and this is trending towards complexity. However, the problem above has been an issue and I think it bears taking into consideration when developing my strategies. (Puns intended)

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

To determine if a system may have merit, I have two choices:
  1. Do it manually, either on a chart or in an Excel workbook
  2. Write some bare bones code and see what happens
#1 is time consuming, but allows me to get closer to the idea. There is the risk of confirmation bias, in seeing only what I expect to see.
#2 is much quicker, but then it obscures problems like the Big Bar problem noted above. There is also a tendency to toss away a good idea because the initial results do not look good. I can very quickly code a lot of different types of strategies, so the speed at which I can move from idea to feasibility testing is great.

I will generally use a combination of both methods, starting with #1 and then moving to #2. In the case of my latest set of ideas, dubbed 'Triple Crown', I used 1, then 2, and then 1 again.

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

Back to today's nonsense in the market, I love days like this. COVID-19 is really bad (not as bad as the flu, mind you), but I am not going to freak the frack out because of it. Any time I see futures down > 1%, I step back, observe and think. We all have our favorite movies about trading (Trading Places, Boiler Room, etc.), but one of my all time favorites is It's a Wonderful Life. George Bailey is about to go on his honeymoon with a huge wad of cash when a run on the banks occurs (early 1930's), including George's Building and Loan. George returns to the Building and Loan to keep it from collapsing.
"Don't you see what's happening? Potter isn't selling. Potter's buying, and why? Because we're panicky and he's not.
That's why. He's picking up some bargain."
George Bailey, It's a Wonderful Life
Okay, IAWL is not expressly a movie about trading, but the lesson is on-point and timeless. I like shorting the panic and buying the rebound.

Testing my system in sim today on RTY (using manual entries) I was able to close $1,644. It is one of those rare occasions that you hit a bottom or have just the right entry at the right time. I had two of those once-a-year trades (started with two sideways trades: +$50 and a -$110).

Yes, this is sim and I'm not a discretionary or manual trader. I am working through the proof of concept, and the volatility we had today was perfect for testing my system. If I have to trade it manually, I will, but I would rather let the machine handle the entries and exits.

As a side note: I could have and would have traded live today, but I do not have a system or methodology that I would trust. I have stepped into the market on such days without a system or rules, and been absolutely slaughtered. So the long process of developing trading methodologies, models and strategies is part of getting me to days like today, when I can grab a trading model, step into the market, and profit from the panic.

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

We were prepping for a strategy submission to the Strategy Factory Club, as the deadline is today for EasyLanguage strategies. We have a good strategy that passes all backtest, walk-forward, and Monte Carlo testing. Unfortunately, it contains a custom indicator that I don't want to release, as it may be part of our edge (or not). Gotta protect whatever IP we have.

I hope we have something for the March submission. I have a Eurodollar system that is promising.

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

That is all I have for today. Have a good evening and see tomorrow!

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #207 (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

Lightning strikes twice. So today, again COVID-19 poured a ton of FUD into the market. That being said, my system tracked the long downward trend from 930 ET to 1430 ET on RTYH20.

The system I am developing has a strength in catching a trend and staying with it. So here was my day:





I am 'holding' one contract over the session close.

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

This is all fine and good, but lightning does not strike with this consistency. I'm seeing unicorns here (black swans... insert your favorite metaphor), when I really want to see deer (they are everywhere these days, it seems). I could have these two great days followed by a crappy month and watch all of this dwindle to nothing.

I completed two weeks of analysis (March 2017), and it wasn't pretty: -$1,115. There are some data inconsistencies on 3/7 and 3/8 around volume and open interest which appear to have thrown off my indicators... not sure what is happening there, but caused my indicators to go wonky and point in opposing directions (and two losses totaling $600).

There is more work to be done. The big bar problem is still that: a problem.

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

That is all. I am still grinding through. We are working a heating oil strategy that we may submit to the Strategy Factory Club. We believe it passes all of the criteria, but I need to check with Kevin on a couple points.

Have a great evening!

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #208 (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 should clarify the entry and exit prices. Those are my shorthand (e.g. 40 = 1640). Hopefully, that didn't cause any confusion for you folks.


vmodus View Post

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #209 (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 am still plugging away at my strategy. I got really frustrated with the slow pace of things (two random weeks in 2017 took me a few hours), so I sped it up by writing all of the rules into a strategy. When I put it all together, I had about 40 combinations of entries and exits to test. It took me as long to write the code as it did to do two weeks of analysis.

The strategy is not useful as a trading tool, but is useful an analysis tool. It boils down to this (ADX is used to confirm entries and reversals):
  • 2 signals for long
  • 2 signals for short
  • 2 signals for exit long
  • 2 signals for exit short
  • 2 signals for reversal long to short
  • 2 signals for reversal short to long
For this current session on RTH20, my system had three trades generated: -$515 (stop loss, variable with ATR multiple), $55, $625 (after slippage and commission) total $160 net. I haven't evaluated the trades, but I'm surprised it did this well. I still have a big bar problem....to be continued.

I did learn two interesting things with this strategy. 1) Close out any open positions Friday before close. 2) Do not trade the first bars after session open. In the case of a gap, the indicators I use still haa an 'echo' or artifacts from the prior session. This is related to the big bar problem described a couple days ago. I have built-in a wait of N number of bars before allowing trading to commence, else there is usually a bad trade because the indicator is wrong.

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

Overall the strategy I am developing does not appear to do well in the long term on the 5 minute chart. There are some jaw dropping trades (see yesterday's entry) and then groups of bad trades. It just a little better than a coin flip, i.e. not a viable trading method. Changing the resolution to 15 minutes or greater seems to provide better results. More work to be done.



That is all to report for today. I hope you are all doing well this crazy week.

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #210 (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
The strategy is not useful as a trading tool, but is useful an analysis tool. It boils down to this (ADX is used to confirm entries and reversals):
  • 2 signals for long
  • 2 signals for short
  • 2 signals for exit long
  • 2 signals for exit short
  • 2 signals for reversal long to short
  • 2 signals for reversal short to long

I would like to add a little clarity here. This is essentially 16 unique entry/exit combinations (signals repeated in reversals). In other words, this is 16 different strategies/systems.

~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