Trading day of week not accurate for some symbols - futures io
futures io



Trading day of week not accurate for some symbols


Discussion in EasyLanguage Programming

Updated
    1. trending_up 566 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 1 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,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
 

Trading day of week not accurate for some symbols

(login for full post details)
  #1 (permalink)
tradeout
Petersfield, UK
 
 
Posts: 2 since Sep 2015
Thanks: 0 given, 0 received

Hello fellow traders,

It's been a long time since I logged into this site, which coincides with the amount of time I have not been trading. With that said, I'm ready to dive back in and looking at a purely automated approach.
I have a couple of profitable strategies in the S&P but want to look to increase the products I trade to provide better portfolio diversification. I'm in the process of taking the Larry Williams concept of TDW to put into a spreadsheet for all symbols, I've written a basic buy on open and exit on close strategy to run across various products and have created custom sessions for the main products so that they only trade the pit hours.
As Tradestation does not allow a simple buy on open I've had to use the previous day to trigger the buy on open of the next bar. One of the issues I've seen is that in a few symbols it's trading on 2 consecutive days which is throwing my results out, I'm using the exchange time session of each and the open of the next day is, absolutely, the next day. Has anybody come across this before and can point me to the error of my ways?
Symbols like E-Mini, Crude and Gold are good, Wheat, Bonds and Copper are trading on 2 consecutive days.

The code for the strategy is very simple which allows me to run the optimization for 5 days of the week easily.

inputs: DoW(1);


If DayOfWeek(date) = DoW
then buy next bar at open;

Setexitonclose;

I have an example of Wheat with a custom session of 08:30 - 13:15 with a DoW value of 2 meaning a buy at open on Wednesday only (so I thought!) which also trades on Thursday.

Thanks for a great forum everyone

Reply With Quote

Can you help answer these questions
from other members on futures io?
How to Register my Company in this Platform
Stocks and ETFs
RangeRider for NT8 V10
The Elite Circle
Alternative to Mcginley Dynamic MA
Sierra Chart
Tradestation 10 work offline
TradeStation
Simple code to end my indicator
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Vinny E-Mini & Algobox Review TRADE ROOM
281 thanks
Would you share your Holy Grail?
83 thanks
EURUSD M6E/6E Euro
63 thanks
Spoo-nalysis ES e-mini futures S&P 500
47 thanks
TST/OneUp/LeeLoo/Earn2Trade
17 thanks
 
(login for full post details)
  #2 (permalink)
tradeout
Petersfield, UK
 
 
Posts: 2 since Sep 2015
Thanks: 0 given, 0 received

I've managed to figure this out and thought I'd post the solution in case anybody else is looking to solve this.

It seems the custom session is not enough on it's own using the day of week, by adding a < SessionEndTime this now works perfectly.


inputs: DoW(1);


If DayOfWeek(date) = DoW and Time < SessionEndTime(0,1)
then buy next bar at open;

Setexitonclose;


This is not some crazy strategy I'm looking to implement, more to find out which days work better for which symbols.

tradeout

Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Trading day of week not accurate for some symbols


Last Updated on September 27, 2021


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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