Attack of the Robots - An Algo Journal - Trading Journals | futures io social day trading
futures io futures trading


Attack of the Robots - An Algo Journal
Updated: Views / Replies:3,334 / 63
Created: by vmodus Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Attack of the Robots - An Algo Journal

  #11 (permalink)
Somewhere, Delawhere, USA
 
Trading Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker/Data: Tradestation Securities
Favorite Futures: VX, my kids
 
vmodus's Avatar
 
Posts: 257 since Feb 2017
Thanks: 431 given, 416 received

Fun-day, Monday

I was watching an old Malcolm in the Middle episode last night, Smunday, where the kids tricked their mother into thinking Monday was actually Sunday so they could stay home from school. Thus today's title.

It was a fun day for me, mostly. I was actually up late Sunday night (after 2 am), as I had a few ideas for trading that I wanted to hammer out. I was trying to see if trading Ehler's Instantaneous Trend indicator (as built into my strategy) would work for the Dow e-mini on the 120 minute chart. I did it manually using the indicator and chart data from Tradestation, in Excel. It was much of a mental exercise as anything.

That didn't come to much. It would be tradable if I avoid the ranges, which are pretty easy to identify (YMM19 1 minute chart):
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


The challenge that I have is calculating the range mathematically. I'm not sure if this is meaningful to anyone or not, but this is what it looks like in Excel:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


It may be self-evident, but the smaller the number (or the distance between the two lines), the closer the iTrend and Trigger lines are. When the numbers go from negative to positive (crossing zero, essentially) it's a cross-over just like a moving average cross-over: indicates a change in trend. When we see the numbers close (0, 1, 2, -1, -2), then that is a tight range. I'll work through that eventually.

I modified one of my strategies to do what I was doing manually last night. Then I decided to take it a little further. I wrote and tested it as a scalping strategy on the YMM19, 1 minute chart. The rules are pretty basic:
  • When iTrend crosses over, enter a limit order a few cents above (short) or below (long) the closing price
  • Exit after 'n' bars once the entry occurs
  • Only trading this in the highest volume times: 925 to 1355 ET
I was able to get it written, tested, back-tested, optimized, and walk-forward optimized. It was promising enough, when testing on unseen data, that I just decided to activate it on my sim account, to see what it would do. I made a $10 profit (two ticks), less commission. It was only active for about an hour and the market was trending, so there were not any additional opportunities. It will be fun to see what it does tomorrow.

In other news....
My partner gently reminded me that I should be running my one strategy in sim (VX futures), so I turned it on, but noticed a problem that I think has been causing some of my headaches. If you look at this chart, you will see where I have 16 trades (these were just the strategy, not actual trades taken by the sim).

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


I actually only had one trade generated (the other ones would have happened before I turned on the strategy). My indicator only shows 5 cross-overs, not 16. Anyhow, that is a something I have to investigate. I think it is unique to this instrument, because of how tight the indicator can be (e.g. iTrend = 14.55 and Trigger = 14.54). If I can get this figured out within my code, then I will be in good shape.

For tomorrow:
  • Activate the simple YM scalping strategy and see what it does
  • Maybe, just maybe, fix my 'broken' VX strategy
One of these days, once I clear my backlog of other work, I will start showing some process flows for how our strategies work, at least theoretically.

See you all tomorrow!

~vmodus

Visit my futures io Trade Journal Reply With Quote
The following 3 users say Thank You to vmodus for this post:
 
  #12 (permalink)
Somewhere, Delawhere, USA
 
Trading Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker/Data: Tradestation Securities
Favorite Futures: VX, my kids
 
vmodus's Avatar
 
Posts: 257 since Feb 2017
Thanks: 431 given, 416 received

It's Not Just Math

Today's lesson in algo trading, on the Tradestation platform, at least, is brought to you by 'Math'. It's not just for physicists.

Whenever a client or my partner comes to me with a wildly complex problem regarding numbers and outcomes, my go-to answer is: "It's just math". So when is math not math (talking applied math here, not number theory or such abstract things)? Apparently when working with Tradestation indicators and strategies.

One of the problems I have had, as alluded to yesterday, is that I'm getting a ton of entries that I don't think I should be getting. To put this mathematically (pick your favorite):
 
Code
Strategy Value  ≠  Indicator Value
... or ...
Strategy Value  <>  Indicator Value
... or ...
Strategy Value  !=  Indicator Value
The indicator does not return the same value as the strategy, even though the code calculating the math is identical. It is possible that this is a timing issue (indicator or strategy lags by a tick or bar). I haven't worked with EasyLanguage enough to be able answer the question, 'Why'? I'm sure the problem is in how/or when the calculations occur. There are things that happen 'intrabar', but apparently even a slight delay will throw off the calculation. I drew some dashed lines on the print log from Tradestation which show the possible delay (though this is a 5 minute bar...shouldn't be that far off):
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


In EasyLanguage (at least the Tradestation flavor), we have a tool called ADE (All Data Everywhere), which allows us to store data in memory and retrieve it anywhere else. My solution is to simply use ADE in the indicator to 'put' the data for my two values (iTrend and Trigger) and retrieve it in the strategy. That is how I figured out what you see in the screenshot above.

I've modified my strategy to use the indicator value, as I just described. I will be back-testing and optimizing it over the next couple of days to see if I get better results. If it passes, then the usual cycle of sim testing and then production, if it passes all of our tests.

Today's Results:
  • Re-coded my VX strategy. In back-testing it performed exactly the same as it's predecessor, but I expect different results in sim tomorrow.
  • Today was a weird day for VX, as it had only one long, strong move in the morning, followed by a slow reversal. By my strategy, only two orders would have been triggered on the 5 minute chart. Normally we see 5-10 orders per day.
  • I ran my YM strategy in sim. It did horribly, which is not surprising. It did not test well through walk-forward optimization. It got killed in range. More work to do on that.
  • I played a little with with a free pivot tool from Tradestation, called Person Pivots Daily. Interesting and might have a use.
Tomorrow:
  • Sim testing the new VX strategy.
It is late, I'm sleepy. Later, yo.



~vmodus

Visit my futures io Trade Journal Reply With Quote
The following 3 users say Thank You to vmodus for this post:
 
  #13 (permalink)
Somewhere, Delawhere, USA
 
Trading Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker/Data: Tradestation Securities
Favorite Futures: VX, my kids
 
vmodus's Avatar
 
Posts: 257 since Feb 2017
Thanks: 431 given, 416 received

Wednesday - early update


I may not be able to post later, but I wanted to report my results trading the VX (5 minute) with my revised strategy ($100 profit target):

Today's sim results (as of 2:05 EDT):
  • Four legitimate trades, $390 profit (long, short, short, short)
  • One phantom trade, $97 profit (short) >> this was part of the second short trade, but it placed an order for two contracts, rather than one....still a mystery
  • No losses
  • Just for fun and practice with the Chart Trading tool, I day traded YM 1 minute in sim, manually using a simple crossover indicator and my intuition. Made $50 in funny money. I stopped right before a $250 move started (I was hungry). There are some weird things with execution in Tradestation that I will have to investigate.
So far, so good with VX. It is just sim, but since moving from 1 minute to 5 minute charts, I'm hoping my limit orders get filled. For those just tuning in, the VX does not allow market orders, only limit orders. The wait can be excruciating.

Here is the duplicate (phantom) order from earlier:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


I have no clue why that's happening, but I believe I can code around it. It is likely due to a condition hitting twice, before the first limit order was filled.

I have one more observation about the Trade Manager screenshot (above). One advantage to using limit orders for our exits, is that the exit limit order is getting placed as soon as the entry order is being filled. If you see the first two lines above, you see my buy (exit) was placed when the sell (entry) was filled. I'm guessing that this will give the order a higher priority than if it were placed later. It could explain why when I was trading that my exits were getting filled a lot quicker than my entries.

I will evaluate my profit target later today/tonight, as $100 may be too conservative for a 5 minute chart ($100 = 2 ticks, if you will). I'm guessing $150-200 is probably reasonable. I will say that the VX is definitely not the easiest instrument to trade. If I can master it, then I think it will serve me well.

Tomorrow:
  • Keep running VX sim
  • Will not day trade YM in sim; that is just not where I am right now with my trading

Until next time....

~vmodus

Visit my futures io Trade Journal Reply With Quote
The following 3 users say Thank You to vmodus for this post:
 
  #14 (permalink)
Chicago
 
Trading Experience: Beginner
Favorite Futures: MES
 
snax's Avatar
 
Posts: 607 since Feb 2019
Thanks: 2,080 given, 1,644 received


vmodus View Post
I may not be able to post later, but I wanted to report my results trading the VX (5 minute) with my revised strategy ($100 profit target):

Today's sim results (as of 2:05 EDT):[LIST][*]Four legitimate trades, $390 profit (long, short, short, short) [*]One phantom trade, $97 profit (short) >> this was part of the second short trade, but it placed an order for two contracts, rather than one....still a mystery[*]No losses

~vmodus

Nice work, @vmodus!

Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to snax for this post:
 
  #15 (permalink)
Somewhere, Delawhere, USA
 
Trading Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker/Data: Tradestation Securities
Favorite Futures: VX, my kids
 
vmodus's Avatar
 
Posts: 257 since Feb 2017
Thanks: 431 given, 416 received

Late Wednesday observations

Two things and I'm done for the day (Liverpool and Barcelona are playing... priorities you know).

1) One additional trade by my VX strategy, +$98 profit. It was a perfect day for the strategy (100% wins). It's sim, so we shall see how things go. I won't go live until I fix my 'extra order' bug.

2) I was looking at the 1 minute YM chart when the Fed news broke at 2pm today, and this falls under the "Hey kids, don't trade the news!" department:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


I just thought it was hilarious to see how people initially reacted to the news. 50 point swing in the first minute ($250), 120 point swing in twenty minutes ($600). There are a couple of trades that I would have taken (@1352 long, and reverse @1429 to short position, out by 1454), if I had continued my day trading exercise from earlier. This makes me think about short term discretionary trading opportunities around other news events. I will explore other significant dates and events for non-algo trading.

Later on!

~vmodus

Visit my futures io Trade Journal Reply With Quote
The following 3 users say Thank You to vmodus for this post:
 
  #16 (permalink)
Denver Colorado/USA
 
Trading Experience: Intermediate
Platform: SierraChart, ThinkorSwim
Favorite Futures: ES,ZN,6E,CL,GC
 
LittleFinger's Avatar
 
Posts: 85 since May 2017
Thanks: 78 given, 79 received


vmodus View Post
This makes me think about short term discretionary trading opportunities around other news events. I will explore other significant dates and events for non-algo trading.

I've considered starting a database of previous news and econ events for backtesting. From watching the market react to the Fed over the last couple years I believe there is an exploitable pattern.

I wonder what some good sources for this information are. I usually use Forex Factory, but I'm sure there's some other alternatives.

Reply With Quote
The following user says Thank You to LittleFinger for this post:
 
  #17 (permalink)
Somewhere, Delawhere, USA
 
Trading Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker/Data: Tradestation Securities
Favorite Futures: VX, my kids
 
vmodus's Avatar
 
Posts: 257 since Feb 2017
Thanks: 431 given, 416 received


LittleFinger View Post
I've considered starting a database of previous news and econ events for backtesting. From watching the market react to the Fed over the last couple years I believe there is an exploitable pattern.

I wonder what some good sources for this information are. I usually use Forex Factory, but I'm sure there's some other alternatives.

I was thinking earlier today that I may have my assistant put together something. I know money.cnn.com usually has a weekly list of events (earnings, Fed notes, ADP reports, unemployment, etc.). If I could know the time and day of each of those, then I could easily back-test those. The important ones are the events that people tend to react/over-react to.

I did something similar with holidays and I actually built a function that my strategies could use that would avoid trading around certain holidays. It also helped in back-testing, avoiding holidays.

I'll post it here on FIO if we come up with anything.

Visit my futures io Trade Journal Reply With Quote
 
  #18 (permalink)
Somewhere, Delawhere, USA
 
Trading Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker/Data: Tradestation Securities
Favorite Futures: VX, my kids
 
vmodus's Avatar
 
Posts: 257 since Feb 2017
Thanks: 431 given, 416 received

Thursday - Full Auto Day

Hello all! Today was just a weird, weird day. As I mentioned and planned yesterday, I ran the revised VX strategy on our sim account today. It was scary good. Rather than get into too much detail, I'll just lead with my chart:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Results:
  • I don't know how many trades the strategy took. I stopped counting at noon. (feel free to count in the chart above)
  • Total P/L after commission: +$3,161
  • No slippage, as these are all limit orders
  • I had a few losses, and the day actually started off with some give and take
  • I do not have the final win/loss ratio, max drawdown, etc. I will calculate when I have more time or delegate it.
  • My automated exit did not go as planned, so I had to manually exit
  • My duplicate order checker did not work (described in prior posts); I will have to manually monitor this strategy until I can get a working solution.
  • As a result, I did hold two contracts for a short time, which I manually exited
Other Observations:
  • This market almost always has the daily high or low around noon (the chart above shows this perfectly). Yesterday was an exception, as the market reacted to the 'non-news' news event from the Fed meeting. This presents a potential trading opportunity. I have to go way back and see how well this theory holds up over the past two years.
  • As a result of yesterday's late action, I expected higher volume day, which we got. This probably had a lot to do with our good results.
  • Tradestation is still a pain in the butt. I had to totally hack the installation on my other computer so that I could free up my regular workstation for other, non-trading tasks. I was late into the market by about 10 minutes. I actually had to dig into the registry and manually purge a bunch of files.....ugh.
Reality Check:
I don't expect these type of results live. If I can pull $200 per day from this market, that would be just fine (for the account I'm trading). My goal is actually very modest for this month: ~ $79 / day. My bigger goal is actually to have a fully automated system, so that I can focus on other things (more algos, coding some indicators and functions, etc.). It was a goal I set for myself last month, but familial responsibilities took precedence the last two weeks of April.

This strategy appears to work well in a volatile market, or more specifically volatility in the S&P 500. Here is how I understand it:

S&P 500 >>>> S&P 500 Options >>>> VX Futures

If S&P 500 is highly active, so too will the VX be active.

Tomorrow:
  • Run the strategy live from 9:25 to 10:30 EDT
  • Assess the results against the strategy report
  • Decide to continue or pause the strategy

I can tell you right now, I could not trade the VX as a discretionary trader, at least in the 5 minute timeframe. It moves so slowly that it is nerve wracking. This is a big advantage of automation: being able to walk away and come back later. I would probably only attempt that as a swing trader, taking the two or three big moves per day that this market offers.

I have a ton of other work, so I gotta roll. Good thing I just had to watch the strategy today.

Have a good night and I'll see you all tomorrow!

~vmodus

Visit my futures io Trade Journal Reply With Quote
The following 3 users say Thank You to vmodus for this post:
 
  #19 (permalink)
Chicago
 
Trading Experience: Beginner
Favorite Futures: MES
 
snax's Avatar
 
Posts: 607 since Feb 2019
Thanks: 2,080 given, 1,644 received


vmodus View Post

Results:
Total P/L after commission: +$3,161

Reality Check:
I don't expect these type of results live.


I can tell you right now, I could not trade the VX as a discretionary trader, at least in the 5 minute timeframe. It moves so slowly that it is nerve wracking. This is a big advantage of automation: being able to walk away and come back later.

~vmodus

Wow, @vmodus that is terrific. Don't sell yourself short though, sure today was more volatile than recent days but do you have any hard evidence that says you can't make 20-30% of this on less volatile days? I really like the progress you're making! You're making me more interested in automated trading

Visit my futures io Trade Journal Reply With Quote
 
  #20 (permalink)
Somewhere, Delawhere, USA
 
Trading Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker/Data: Tradestation Securities
Favorite Futures: VX, my kids
 
vmodus's Avatar
 
Posts: 257 since Feb 2017
Thanks: 431 given, 416 received



snax View Post
Wow, @vmodus that is terrific. Don't sell yourself short though, sure today was more volatile than recent days but do you have any hard evidence that says you can't make 20-30% of this on less volatile days? I really like the progress you're making! You're making me more interested in automated trading

Thanks for the kudos and encouragement. We have had nothing in 12 years that has come close, though my partner trades a very good CL strategy. I have only been active for the past several months in the business, but as I mentioned early in this journal, I'm lazy, so I write code to do the dirty work.

The walk-forward optimizations for this strategy all pass, it works pretty much with a wide set of parameters. I could probably pick a few random numbers within a range for each of the three critical parameters, and still be profitable. It probably explains why the WFO is working so well....even with random data thrown in, it cannot find a bad set of parameters. These are the run results from last night:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


I think the one thing that sets this apart from prior iterations of this strategy, is that I optimized a parameter in a way that was not intended (as the late, great Bob Ross would say, a 'happy little accident').
  • The parameter tells us what amount to set for our limit entry price.
  • Normally you want to set it at any value above 1, otherwise you're entering a worse price ( 1 = 100%, 1.1 = 110%, .9 = 90%).
  • This crazy strategy actually performs better when using a number less than 0% (in my case I think I'm using about 90%). It's basically a multiplier for determining the entry price. I don't know why this works, but that is the way it is.
Last week, when I tested the 5 min chart in sim and live, any value greater than 1.0 did not perform as well. I must have been feeling whimsical when I decided to optimize that parameter lower than intended, after all of my code changes. Apparently that was the thing that took this strategy over the edge. Here is the Monte Carlo analysis I just ran on the 'ideal' parameters.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


So according to this run, there is a 100% chance that it will produce at least 2852% return on initial capital ($10k account) The general thought is that if a strategy passes a Monte Carlo test, then it is likely to work. I have tested strategies that passed back testing, but failed Monte Carlo and guess what? They failed in sim.

Again, this will come down to whether orders get filled. The more liquidity, the better. Today was at about 30% above average volume. Tomorrow should provide some proof. I'm with you. If I can get to 20-25% live, then I would be good with that. Then I can tackle some other beasts, like ES (that's my holy grail). Incidentally, this strategy probably would not work anywhere else.

I am excited to try this out tomorrow, but my feelings are tempered. We have had so many wonderful 'grail' type strategies that just didn't work out live for different reasons (execution, fear, doubt, etc.). Though, truth be told, we haven't had one quite like this.

cheers,
~vmodus

Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to vmodus for this post:

Reply



futures io > > > Attack of the Robots - An Algo Journal

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)
 

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now
 

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now
 

Show us your trading desks and win over $5,000 in prizes w/Jigsaw Trading

September
 

Webinar: The Best Entries and Exits in trading & in life w/Agustin Lebron

Elite only
 

Webinar: NinjaTrader 8 Newest Features Release Sneak Peek

Sep 26
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
FX Robots / Automatic Systems Minds Currency Futures 6 July 24th, 2015 11:51 AM
Are robots hurting job growth? stephenszpak News and Current Events 0 January 13th, 2013 11:47 PM
ART CASHIN: Robots May Have Been Responsible For A Rare Synchronization ..... kbit News and Current Events 0 March 7th, 2012 10:47 AM
Robots Begin Removing Oil Well Cap, Oil Flows Freely Quick Summary News and Current Events 0 July 10th, 2010 05:30 PM


All times are GMT -4. The time now is 06:38 PM. (this page content is cached, log in for real-time version)

Copyright © 2019 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts