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 91,965 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

  #191 (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

It occurred to me that I should probably give a visual of the system I am forward testing. This is the ideal trade, and it comes up often enough to make up for the small in/out losses:



+$1275 on ESH20 and still running.

The MACD gets me in; the iTrend keeps me in, when other indicators may kick me out. Just in the example above, I had a potential 4 exits and re-entries. The iTrend is an exceptionally difficult indicator to work with, so I have learned to be extremely selective in my usage. I do not like it for entries on most markets and I found it to be easier to use for discretionary trading than system trading.

Now to fix all of the little things nibbling away at these profits....

Good night.

~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?
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Deepmoney LLM
Elite Quantitative GenAI/LLM
ZombieSqueeze
Platforms and Indicators
Are there any eval firms that allow you to sink to your …
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
  #192 (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


SMCJB View Post
I was thinking about this some more this evening. The problem with all of those volatility calculations in Tradestation (except ATR) is that they are based upon returns and hence will not work on continuous adjusted futures contracts.

Better System Trader, Top Traders Unplugged are both very similair to chat with traders. Two of my favorites are Macrovoices (podcast) and Real Vision (Subscription TV currently has a $1/1 month special) but they trading/finance and not system trading specificly.

Wow, thanks! I just subscribed to BST and TTU. Scanning some of the titles, it seems like BST is ideal for an algo like me.

Cheers!

~vmodus

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


Short entry (pun intended) for today.

Today was interesting. I ran the strategy that I've been talking about the past few days in sim again. It ran for another full 23 hours (except for NQ.... forgot to change the dates) on ES, NQ, and RTY. I didn't expect it to be profitable, as the strategy has flaws described yesterday. The purpose of today's exercise was to run multiple strategies, all with long bias, and see what other flaws may surface.

Of course, there is high correlation with these instruments, being all index funds, so they generally moved in the same direction. Overall trend affected the strategies: profitable during bull runs, not so profitable during bear run-downs. The high P/L of the day was about +$1400, the low of the day was about -$1,000, swinging a total of $2,400 peak to trough.

NQ took way too many trades, about four times as many as RTY. RTY was mildly profitable. There were two trades of about +$2,100 (RTY and ES) which were not counted, as I reset balances on my sim account. End of day P&L was -$844, or $1,256 if I add in the two missing trades.

There are instrument and chart specific settings, so I haven't quite figured out NQ yet, given the large volume of trades. ES performed a lot better than yesterday, taking fewer and better trades.

I am looking for a way to change the trend bias during the day, i.e. start taking short entries when the overall market turns. I'm not sure if this will work, but it will be integrated into another idea. My partner suggested Ehler's Trendflex Reflex indicator (TASC Feb 2020), which may be a brilliant idea.

Strategies started up again at 1800 ET, so another night and day to see if I can identify any additional issues before I bury this idea and move on to variants. I have 5 new ideas that have spawned from the original ideas.

For the record forward testing is a bear. No pun intended.

Go robots go!

~vmodus

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

You know, they call trading a zero sum game. I have never really agreed with that statement. If it were, trading would be a lose-lose for everyone if that were the case, and no one would trade. Anyhow, before I go down a rabbit hole, I have just been thinking about it. For brokers, data providers, etc., all other things being equal, trading is definitely not a zero sum game. We have to make enough money to get to zero. So if we were all even, we would still lose. So much for zero sum.

I'm thinking of becoming a broker.

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

It's been a weird day. I mentioned yesterday that forward testing a strategy that cannot be properly back-tested is a pain. So I have had to work the ideas directly in sim, as well as debug. And then there was my data issue.

Today was a zero sum day, kind of. I mean, I'm flat for the day in simulation as I write this, but that is fine. I found a couple of issues, had a couple of bad trades as a result of an oversight (I forgot to have my code check open positions before sending another order.... oops).

I killed another two ideas today (TrendFlex for trend bias... ). I tried to see if Trendflex could help me identify a trend bias, but it only worked some of the time. (if you want more info on Trendflex, see the link at the end of this entry). I also wrote something to exit if the turn in trend never came, but it bombed in a big way. A stop loss actually works better in that case, and doesn't seem to occur very often.

My data issue:
I was having a heck of time trying to figure out why my ES strategy died on January 16th. There was about a $2000 drawdown in my strategy. Well.... seems like there is a data issue on ESH20, at least for me:


Yeah, 5 point trading range for over eight hours on a Thursday during a peak time of the day? I don't think so (verified with a CME chart). It took me a couple of hours to figure out that I was dealing with a data issue and not a problem with my strategy having a bad day. I'll have to contact Tradestation for a data correction on this one. Wow.

As I finish writing this, I'm up to +$90 for the day on RTY and ES together. Zero sum game... kiss my booty.

Gotta run. Have a good evening everyone and see you all on the other side of midnight.

~vmodus


Trendflex indicator and functions can be found here:
Traders Tips - February 2020

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #195 (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
So all of that led me to thinking about OBV again. It may have some utility for me, but I am interested in the strength change from one bar to the next. I gave some thought about calculating the slope of (darn near impossible from my vantage). I was reading a forex forum where the discussion was around the inability to calculate it for chart data. I cannot slap a protractor on my screen to measure the angle (and there is the problem with scale). I am not a mathematician nor an engineer, but I may have a novel way to emulate it. If I figure that problem, even in the most rudimentary way, I will share.

Okay, replying to myself here. I was perusing the Jan 2020 copy of TASC and noticed that the slope calculation problem may have a solution. I am just now looking at it, but it might solve the problem. Anyhow, here is a link to the code for a variety of different platforms:

TRADERS™ TIPS - JANUARY 2020

I have had a lot of other problems I have been puzzling through.... slope has been the least of them.

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #196 (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 just a quick update for the day. My strategies ran overnight on RTY and ES. I noticed an issue with them at about 800 ET this morning. It was reversing positions on my entry signal, while totally ignoring my exit signal. Thankfully I caught the mistake, but two good moves were lost in that time period. I created a new strategy from that, documented it, and then put it in place.



Aside from that blunder, the strategy ran on the two markets from about 900 until market close at 1700.
  • Closed P/L: $242
  • Open P/L: $155 (1 contract, RTY)
The P/L numbers themselves are not important. This is not a 23/5 strategy (23 hours a day, 5 trading days per week). When I wrote the goal for this idea, it is meant to trade about 4 hours per day. My wife/partner suggested that a daily profit target might be a good idea, to which I agreed. To that end, here is a sample of what closed P/L looked like from 900 to 1700:
  • +89
  • +363
  • +720
  • +609
  • +632
  • +329
  • +211
  • -110
  • -73
  • +99
  • +27
  • +46
  • -4
  • +333
  • +561
  • +487
  • +242
My goal here is to see what execution might be like and to see if the orders coming from the strategy match what is showing up in simulation. Simulation is crap for analyzing results like P/L, so that is less important than accuracy. I am also identifying any additional issues that might exist. The peak-to-trough drawdown you see above was -$830. Two of those were consecutive stop losses (300 a piece), which identified a lingering issue with being on the wrong side. I did not interfere despite some temptation, just let things run.

Anyhow, I have one more 23 hour cycle. Let's see how it does Friday.


~vmodus.... out

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #197 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,041 since Dec 2013
Thanks Given: 4,375
Thanks Received: 10,192


vmodus View Post
This is not a 23/5 strategy (23 hours a day, 5 trading days per week). When I wrote the goal for this idea, it is meant to trade about 4 hours per day.

Custom Session (works if you test it this way) or are you arbitrarily picking (ie juggling grenades) which 4 hours a day ?

Reply With Quote
Thanked by:
  #198 (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


SMCJB View Post
Custom Session (works if you test it this way) or are you arbitrarily picking (ie juggling grenades) which 4 hours a day ?

Haha, juggling grenades. Haven't heard that for a while. Running the strategy around the clock, for now, will give me a data set of trades to analyze, since I cannot properly back-test. My ideal window I'm looking to trade is 700-1600, though the sweet spots seem to be pre-market (700-930) and 1400-1600.

There still a ton of work, so this isn't a strategy that I can see going live with any time soon, without a large data set to analyze, so there is a time factor involved. I have to do Monte Carlo analysis, too. If and/or when I go live, it will be with MES.

~vmodus

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


SMCJB View Post
Custom Session (works if you test it this way) or are you arbitrarily picking (ie juggling grenades) which 4 hours a day ?

I haven't toyed with custom session yet. That is something I need to look into.

Thanks!

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #200 (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 missed my journal entry Friday. I was overloaded with a client project which has not been going well (until today).

Quick update:
Friday was just a bad day for my strategy. I ran it for another cycle of 23 hours and it tanked. I think it ended -$1300 for the 23 hour cycle. But I discovered two things that would have brought that number to a more manageable -$400 or so.

The goal of the exercise is really about data collection. The more data I have, the better I can determine whether the strategy is tradable or trash. It was interesting to see how it worked on a holiday with low price action, which overall was okay (see below). We normally do not trade holidays (I wrote a function that turns off trading on the major holidays), but maybe this strategy is suitable for holiday trading.

What I learned:
Firstly, I found a situation where a second entry is taken while I am still in a position. For example, if I am in a short position, there may be another short signal occur. So another order is getting sent. I have checked the code and I do not see why or where this would happen. So I held two contracts that contributed to the larger loss above.

Secondly, I have been learning about ATR (average true range) and really trying to find a way to apply it to my trading. I haven't used a ton of stop losses in the past and I dislike them as much as I dislike profit targets, trailing stops, etc. However, they are a must with this strategy and I had three frustrating stops on Friday. I had some downtime Sunday, so I spent a little of that time researching analysis methods. I decided to use ATR to calculate stop-loss, and then ran those numbers against some stop losses I saw last week, Friday most notably. My stop losses were lowered by 66% (from $900 to about $300), using ATR. In other words, my stop losses were way too high.

Here is what I am using, in psuedo-code, using a common ATR multiplier of 3:
 
Code
Stop_loss = ATR * 3 * big point value
Example:
  • ATR = 1
  • Multiplier = 3
  • Big Point Value = 50
  • 1 * 3 * 50 = $150 stop loss
It was eye-opening, to say the least. We have optimized on stop loss in the past, with limited success. Again, I have not used stop losses extensively, but now I think I need to unearth some older strategies that struggled under a fixed stop loss.

For now, I am estimating ATR for my stop losses, as I am using Range Bar charts and have not devised my ATR calculation for this type of chart, but I am using a general estimation that is working for now. The stop loss is also helping gloss over another issue I have to resolve (being on the wrong side of town at the wrong time, metaphorically speaking).

Data Collection:
I am using range bar charts, which are impossible to backtest strategies. I wrote some code to write data to a file from my strategy with data from every bar as it occurs (date, time, OHLC, OBV, ADX, etc., plus order signals). Hopefully I will have a good 5 days of data to analyze. The reason I am writing to a file is that every time I reload the data or a data disconnection occurs, the chart gets repainted.

Choppy Waters:
I started the strategy Sunday night and let it run for the 19 hour cycle (1300 ET session close today). At the end of the session I was +$351, with open short positions on RTY and ES. When I came back to my office just after the market opened, I saw the gap down. So for my sim account, I am showing +$1800 in open positions. But not so fast.... it is possible that a little bit different price action earlier today could have put me on the wrong side of this. Sure, it is nice to be 'right', but I am just collecting data here. I will be interested to see how much chop we have overnight and into the regular session tomorrow, and how the strategy holds up.

I'm tired. I have a long week ahead (non-trading stuff).


~vmodus

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




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