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



Attack of the Robots - An Algo Journal


Discussion in Trading Journals

Updated by vmodus
      Top Posters
    1. looks_one vmodus with 255 posts (523 thanks)
    2. looks_two SMCJB with 24 posts (51 thanks)
    3. looks_3 kevinkdog with 16 posts (40 thanks)
    4. looks_4 snax with 10 posts (15 thanks)
      Best Posters
    1. looks_one bobwest with 4.4 thanks per post
    2. looks_two kevinkdog with 2.5 thanks per post
    3. looks_3 vmodus with 2.1 thanks per post
    4. looks_4 SMCJB with 2.1 thanks per post
    1. trending_up 25,489 views
    2. thumb_up 703 thanks given
    3. group 42 followers
    1. forum 336 replies
    2. attach_file 100 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

Attack of the Robots - An Algo Journal

(login for full post details)
  #331 (permalink)
Legendary Market Wizard
Somewhere, Delawhere, USA
 
Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker: Tradestation Securities
Trading: My kids, VX, Eurodollar
 
vmodus's Avatar
 
Posts: 770 since Feb 2017
Thanks: 1,449 given, 1,401 received

Not much to report for today. I'm holding out until Sunday night to restart live trading. It is driving me nuts, but I can hold out.

In the meantime, I am running forex simulations and they are working well with the given algo. My pairs are AUD-USD, GBP-AUD, GBP-USD, and USD-CHF. One (minor) problem I have is that if I start a strategy in MultiCharts, it enters a position as soon as I turn on strategy automation. The position is in the correct direction, but the timing of the entry is wrong. I don't want to take a position until the first signal, not enter on an old signal. I just don't know how to fix this problem in MultiCharts, but it is costly if I do not pay attention to it and work around the problem when necessary.

I can prevent or work around this problem easily by:
  1. Starting trading Sunday night, as I usually do (I do not hold positions over the weekend), or....
  2. Start trading at midnight (I have a trade start date parameter), or....
  3. Add a start time to my code, that will only start trading after a given time and date combination
I will probably just stick with #1, as this only is an issue when starting a strategy mid-week.

No pictures or charts today. See you tomorrow!

~vmodus

Enjoy everything!
Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to vmodus for this post:

Can you help answer these questions
from other members on futures io?
3x Fangdango
Traders Hideout
Contract-adjusted volume composite in Sierra
Sierra Chart
Distinguish a Long from a Short Position
TradeStation
Tracking passive Buyers/Sellers on footprint
Traders Hideout
Need help with a simple script
ThinkOrSwim
 
Best Threads (Most Thanked)
in the last 7 days on futures io
VWAP for stock index futures trading?
48 thanks
VWAP oscillator for NT8
15 thanks
Coronavirus COVID-19
13 thanks
Battlestations: Show us your trading desks!
12 thanks
Bitten by FOMC
8 thanks
 
(login for full post details)
  #332 (permalink)
Legendary Market Wizard
Somewhere, Delawhere, USA
 
Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker: Tradestation Securities
Trading: My kids, VX, Eurodollar
 
vmodus's Avatar
 
Posts: 770 since Feb 2017
Thanks: 1,449 given, 1,401 received

I am kind of late on any journal entries, but here goes....

Live trading
Rough start to the week with lots of channels. Currently working only metals right now (HG, MGC and SI). I made one major error on Silver, in that I was running my strategy on the wrong month. I couldn't figure out why it failed so miserably, but I let it run until it hit the circuit breaker (max drawdown for that instrument). It took me a full day to figure out my error. This is my punishment for taking vacation and forgetting where I was. I should be starting silver again when the next session opens. I have some lost ground to make up.

I plan to diversify starting September 1st, by adding an index or two.

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

The Future
I'm looking down the long lens of trading until the end of the year and I see a lot of opportunities. Precious metals trading at/near highs and the indexes trading at/near highs does not really jive, to me at least. I think one of the two groupings is a bubble, but I may be wrong. This may be a new paradigm, so I won't assume anything. Whatever happens, I want to be ready if/when the bubble pops.

I expect Sept and Oct to be huge months, with lots of opportunities. June-August have typically been horrible trading months for me, but I did okay this year. This is an election cycle, so the ride should be bumpy, but fun if you're ready for the ride.

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


Forex Shenanigans
I continue working with testing of forex. For the most part, it has been a bust in practice (sim) testing. Profit factors have been less than 1.2, but I have not even been profitable when factoring in the human element (me) . I was able to establish reliable back test results, which confirm my practice trading. In other words, it is dead.

I have one more promising strategy that passes my backtest criteria and matches forward testing in the practice account. I am going to run this for a while.

Oanda has been a dream to work with. Support is very responsive and helpful (imagine!). I expect our account (corp) to be approved today or tomorrow. The application process, when compared with IB, has been a dream. We completed an application with IB, but they were a pain to work with and we had constant data disconnection issues (>6 per day), so we cancelled our application and tested out Oanda. Oanda's personal versus corporate account process is different, with the former being much easier and quicker, and the latter being a bit more involved. For both (I went through both application processes), the process was clear and concise. Approval for personal was within an hour; application through approval for a corporate account has taken about 5 business days.

With Oanda, I love being able to export all simulated trades directly from their website. This has been greatly useful to me in analysis, especially with trying to estimate and manage spread costs. I have found that their commission + spread pricing is probably the most cost effective, when compared to spread only.

Here is a chart I've been looking at today, since I have been stingey on pictures lately:

Forex USD/JPY Kagi


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

That's all for now!

~vmodus

Enjoy everything!
Visit my futures io Trade Journal Reply With Quote
The following 4 users say Thank You to vmodus for this post:
 
(login for full post details)
  #333 (permalink)
Legendary Market Wizard
Somewhere, Delawhere, USA
 
Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker: Tradestation Securities
Trading: My kids, VX, Eurodollar
 
vmodus's Avatar
 
Posts: 770 since Feb 2017
Thanks: 1,449 given, 1,401 received


Not much to report. I have been way too busy to journal. Diversification has been a lifesaver this week. We have made and lost money in the indexes, and lost and made money in metals. I was a little slow to get started this week (wearing too many hats), but I probably should have started trading the Tuesday session, rather than starting later. Despite the holiday, I'm excited to start up Sunday night again.

I am quoting myself from last week:

Quoting 
I'm looking down the long lens of trading until the end of the year and I see a lot of opportunities. Precious metals trading at/near highs and the indexes trading at/near highs does not really jive, to me at least. I think one of the two groupings is a bubble, but I may be wrong. This may be a new paradigm, so I won't assume anything. Whatever happens, I want to be ready if/when the bubble pops.

I expect Sept and Oct to be huge months, with lots of opportunities. June-August have typically been horrible trading months for me, but I did okay this year. This is an election cycle, so the ride should be bumpy, but fun if you're ready for the ride.

I hate to tell you I told you so, but....

Just kidding. Judging by the past two days, this is already shaping up to be 'one of those months'. I don't think anyone who has been around long enough is terribly surprised. Hopefully everyone is trading well and safely.

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

My Current Challenge
I actually feel like I am growing up, as a trader. I've been trading for a very, very long time, but never like this. I am at a point where I have some strategies that work when the conditions are just right. The big challenge is identifying which instruments will have the highest probability of being profitable with our current algorithms.

Since we are intraday swing traders (for the most part), we shift with the prevailing winds. I had the opportunity to sail with my brother, wife and kids a few weeks ago, and the sailing analogy really works here. The wind shifts just a little, so you adjust your sail accordingly. Sometimes you have to tack in a different direction. That is where I am right now.

So the plan is to evaluate a set of instruments, most likely after market close, and decide if we need to adjust, then be ready for the open again at 1800 ET. Ideally this will be a weekly exercise, as I prefer to let a strategy cycle a full week. This has proven to be the best approach thus far.

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

That's it for the week. Next week should be super fun. Have a great weekend everyone and stay safe!

~vmodus

Enjoy everything!
Visit my futures io Trade Journal Reply With Quote
The following 3 users say Thank You to vmodus for this post:
 
(login for full post details)
  #334 (permalink)
Legendary Market Wizard
Somewhere, Delawhere, USA
 
Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker: Tradestation Securities
Trading: My kids, VX, Eurodollar
 
vmodus's Avatar
 
Posts: 770 since Feb 2017
Thanks: 1,449 given, 1,401 received

I've been mostly silent this week because I have been heads down in learning how to include order macros in my strategies. I have several strategies that require me to put in stop limit orders, but that is not possible using just the normal 'buy' or 'sellshort' commands. This has been a problem for me for at least a year. I have strategies that I want to use stop limit orders with, but have not been able to write.

Which brings me to the order entry macro: .PlaceOrder. I have been trying to figure this out for a long time, but was just frustrated. So I read whatever I could find on the subject, mainly on the TS/EasyLanguage community forums. Initially it just didn't work, but I kept working at it and eventually I got it working for the order types that interest me.

So now I am testing away happily. This is a Swiss Army knife strategy that I have been working on for over a year, but could never implement. I have manually tested this on hundreds of trades with about a dozen different instruments (a labor of love), but I will now be able to incubate (via sim) and eventually deploy. Right now I have to do some work on order management (canceling old order, etc.).

The downside of using macros is that I will not be able to properly backtest this, in the traditional way, so I will need to develop a method for backtesting. Fortunately, that is the easy part of this exercise and I already have a method mapped in my head. I will use EasyLanguage and just write to a file when entry/exit conditions are met.

Two things to do:
  • Fix order handling (extra orders, canceling old orders)
  • Write a backtest 'strategy', which is really just a glorified indicator/study
After that, on to testing!

~vmodus

Enjoy everything!
Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to vmodus for this post:
 
(login for full post details)
  #335 (permalink)
Legendary Market Wizard
Somewhere, Delawhere, USA
 
Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker: Tradestation Securities
Trading: My kids, VX, Eurodollar
 
vmodus's Avatar
 
Posts: 770 since Feb 2017
Thanks: 1,449 given, 1,401 received

Just a little addendum....here is how I call the code from my strategy:

 
Code
Value5 = StopLimitOrder("OncePerBar",SIM123456F,"Sell","Future",
"NQU20",NumberOfContracts,"Day","",MyStopPrice,MyLimitPrice);
In plain English:
Place a stop limit order, short, once per bar, on account SIM123456F, for symbol NQU20, for "NumberOfContracts" (how many contracts I am trading), with MyStopPrice and MyLimitPrice.

The weird thing I ran into is that the 'Action' parameter ('Sell' in my example) for going short is 'Sell' and not 'SellShort'. 'SellShort' failed every time. Once I got around that problem, I was golden.

~vmodus

Enjoy everything!
Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to vmodus for this post:
 
(login for full post details)
  #336 (permalink)
Legendary Market Wizard
Somewhere, Delawhere, USA
 
Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker: Tradestation Securities
Trading: My kids, VX, Eurodollar
 
vmodus's Avatar
 
Posts: 770 since Feb 2017
Thanks: 1,449 given, 1,401 received

Oh geez, what a week. I finally tackled a beast of a strategy that I probably should have written a year ago. It is a simple swing strategy, but fairly complex in that I need to send stop limit orders from EasyLanguage, at least in the normal way. They provide OOEL, or Object Oriented EasyLanguage, which allows for complete control over the process. So I spent a better part of this week learning how to send and cancel orders. I wrote a strategy to manage the whole thing and spent the last 23 hours testing it against multiple instruments in SIM. I found and fixed some bugs, and learned a lot about the process.

In learning, I found that my previously mentioned StopLimitOrder (part of the .placeorder macro), should not really be used anymore, according to the TradeStation engineer who was assisting me. So after learning all of that, now I am onto learning OrderTicket and ReplaceTicket. It is very powerful stuff and I should have learned a long time ago. I already have a little experience using OrderTicket, thanks to @kevinkdog, with canceling unwanted orders, so now I am extending this into order management.

Here is the code snippet for canceling orders (not for use with continuous contracts):
 
Code
OrderTicket.cancelallorders(this_account, rightstr(this_symbol,strlen(this_account)), true);
Apparently there are some distinct advantages in using the OrderTicket functions, as orders are sent to the TradeStation servers, whereas just using the regular buy/sell functions only sent when they occur. I think this takes advantage of FIFO, which works out nicely for us, since our orders may not be filled for several bars, so order fills will be improved. There is also the matter of synchronous versus asynchronous order management, which I won't try to explain here. I've been dealing with this a little in MultiCharts. For my purposes, I am (attempting to) manage all of this via my code.

One of the weird things about coding strategies with OOEL is: you can code it all in an indicator/study (TS actually recommends it), rather than a strategy. It is mind bending, but makes sense in a way. After all, code is code and some of the strategy features are not used.

The main disadvantage is the inability to backtest. For the current strategy I'm developing, I had to code a similar strategy to just record my entries and exits, then dump it into Excel. Fortunately, I already have a workbook in which I do my manual testing of ideas. I like to do things by hand so I gain a very deep understanding of my idea and all the nuances of my idea. I can just drop my entries into the various instrument worksheets and see the results. The other disadvantage is the inability to optimize, but I work a lot with strategies that don't require optimizations so that is not a huge issue.

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

This is one of the charts I was looking at for the past couple days. I like Kase bars for a variety of purposes, not the least of which is that they offer some of the benefits of charts such as Heikin-Ashi or range bars, but with real open and closes. This makes them ideal for strategy development, backtesting and optimization.

Kase Bars on NQZ20, with William's Fractals and Fisher Transform


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

That's all for this week. Dinner and drinks await!

~vmodus

Enjoy everything!
Visit my futures io Trade Journal Reply With Quote
The following 4 users say Thank You to vmodus for this post:
 
(login for full post details)
  #337 (permalink)
Legendary Market Wizard
Somewhere, Delawhere, USA
 
Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker: Tradestation Securities
Trading: My kids, VX, Eurodollar
 
vmodus's Avatar
 
Posts: 770 since Feb 2017
Thanks: 1,449 given, 1,401 received

Well, it has been an interesting few days. I have had to mostly work on non-trading work, but I have filled what little free time I have had with learning what I can about OrderTickets and OOEL (Object Oriented EasyLanguage).

I searched and found the most interesting post on the TradeStation forum (you must have a TradeStation forum login to view):

https://community.tradestation.com/Discussions/Topic.aspx?Topic_ID=157846

One of the folks over there has written an example strategy using OrderTickets. I have been experimenting with it and learning how it works so that I can eventually implement the ideas into the strategy I'm developing for this. I have been able to successfully send, replace and cancel orders, as well as keep a record (writing to a text file) of everything that is happening. I am extremely grateful to Tom47 over there for sharing.

Here is a snapshot of the code I was using to replace the prices on a stop limit I had created and was received, but not filled:

Code to Replace


Replacement Confirmed


That's all for now. I won't post again until Friday. Until then, happy trading!

~vmodus

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


futures io Trading Community Trading Journals > Attack of the Robots - An Algo Journal


September 16, 2020


Upcoming Webinars and Events
 

An Afternoon With futures io member TropicalTrader

Elite only
     



Copyright © 2020 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