NexusFi: Find Your Edge


Home Menu

 





Day Of Week and Day Of Month Bias


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 hoohickle 
WATERLOO
 
Experience: Beginner
Platform: NinjaTrader
Trading: Dollar
Posts: 1 since Jun 2015
Thanks Given: 1
Thanks Received: 0

I was hoping to find a very simple Day of Week, and possibly Day of Month strategy to buy the open and sell the close each day to test weekly or monthly bias. I have not been able to find anything yet for NinjaTrader. Apologies if it is already here and I missed it. Could anyone help? I am not a programmer and have stumbled around trying to create it from scratch.

I should add that I am simply using daily charts with end of day data.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NYSE Owner ICE Invests in Crypto Exchange OKX at $25 Bil …
Cryptocurrency
Orban at 29pct as Hungary Votes Tomorrow -- McIlroy Surg …
Prediction Markets & Event Contracts
April 2026 Jobs Report: +115k vs +65k Expected
Traders Hideout
Saylors 41-Month HODL Breaks: Strategy Sells 32 BTC as $ …
Prediction Markets & Event Contracts
Iran Peace Expired NO: Ceasefire on Life Support, OPEC a …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 
shodson's Avatar
 shodson 
OC, California, USA
Quantoholic
 
Experience: Advanced
Platform: IB/TWS, NinjaTrader, ToS
Broker: IB, ToS, Kinetick
Trading: stocks, options, futures, VIX
Posts: 1,971 since Jun 2009
Thanks Given: 534
Thanks Received: 3,711


hoohickle View Post
I was hoping to find a very simple Day of Week, and possibly Day of Month strategy to buy the open and sell the close each day to test weekly or monthly bias. I have not been able to find anything yet for NinjaTrader. Apologies if it is already here and I missed it. Could anyone help? I am not a programmer and have stumbled around trying to create it from scratch.

I should add that I am simply using daily charts with end of day data.

You can't buy at the open of a bar and sell at the close of the same bar with Ninjatrader. The orders will always happen at the open of the next bar so you'll have to deal with overnight gaps.

The way around this limitation with Ninjatrader is to use a lower time-frame bar to execute your trades on. If you're wanting to do this with daily bars you'll need intraday data/bars for the order execution.

The other way is to use a two-pass approach: run through the daily bars and cache the closing price of each bar in the first pass. Then, in the second pass through the data enter your trade as normal and place a limit or stop order to exit at the already-known closing price so the trade will occur at the closing price of the day. That's a little trickier to code though.


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #3 (permalink)
 Dionysus 
Monterey, CA
 
Experience: Intermediate
Platform: Ninjatrader
Trading: CL
Posts: 80 since Jan 2014
Thanks Given: 28
Thanks Received: 99


I, too, ran into this problem. . was initially frustrated at the inability to do something so simple within ninja, as well as frustrated at the fact that 'exit on close' does not, actually, exit on close, when you're using 1-day bar increments.

Hodson is right. . and I've just programmed a few templates to do precisely what you're doing, feel free to msg me if you'd like the code!


Reply With Quote




Last Updated on August 2, 2015


© 2026 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 - Downloads - Top
no new posts