Buy on Close(Today) - futures io
futures io

Buy on Close(Today)

Discussion in NinjaTrader

      Top Posters
    1. looks_one Mondrakete with 2 posts (0 thanks)
    2. looks_two sam028 with 1 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 MXASJ with 1 posts (0 thanks)
    1. trending_up 3,127 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 4 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

Buy on Close(Today)

(login for full post details)
  #1 (permalink)
Posts: 24 since Feb 2011
Thanks: 1 given, 0 received

Hi folks,

I'm pretty new to NT and Mike's forum.
I'm challenged by a actually simple, but with NT seemingly unfeasable aproach.
I want to implement a simple strategy based on daily data that operates on a Close to Close base.
The logic is going to be:

If the Close today is higher than the Close yesterday, buy on today's close and sell at tomorrows close.
Short analog.

The system is always in market and it's backtesting only.
NT Support already told me that this kind of apprach is unpossible at least using the managed approach of ordering.

Does anybody know how to solve that issue, if necessary using the unmanged approach?
One has to force NT somehow to execute the order on the bar where it's generated and to
excecute it at the Close-price of the today's bar..
Using Index -1 within managed approach yields to weird behavior, not all orders are excecuted.

Any ideas or should I forget about NT?

Cheers and thanks in advance!


Reply With Quote

Journal Challenge April 2021 results (now extended!):
Competing for $1800 in prizes from Jigsaw
looks_oneMaking a Living with the Microsby sstheo
(79 thanks from 10 posts)
looks_twoSalao's Journalby Salao
(23 thanks from 5 posts)
looks_3Deetee’s DAX Trading Journal (time based)by Deetee
(16 thanks from 8 posts)
looks_4Learning to Profit - A journey in algorithms and optionsby Syntax
(12 thanks from 7 posts)
looks_5Rogue MNQ 2/21 Journeyby RogueJoules
(0 thanks from 2 posts)
Best Threads (Most Thanked)
in the last 7 days on futures io
The Crude Dude Oil Trading System
73 thanks
futures io site changelog and issues/problem reporting
71 thanks
Would You Sell Your System?
65 thanks
FIO Journal Challenge - April 2021 w/Jigsaw Trading
30 thanks
Big Mike in Ecuador
25 thanks
(login for full post details)
  #3 (permalink)
Site Moderator
sam028's Avatar
Posts: 3,669 since Jun 2009
Thanks: 3,789 given, 4,505 received

The problem is that you have this information:
1#"If the Close today is higher than the Close yesterday"
at the close itself, so it's too late to
2#"buy on today's close"...
An idea is maybe to add another time frame, let's say a 10 seconds bar, and not use the Close for 1# but the Close minus 10 seconds.

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
(login for full post details)
  #4 (permalink)
Posts: 24 since Feb 2011
Thanks: 1 given, 0 received

-Unfurtunately I don't have another timeframe, it's daily data only back to the 70's.
I tried it like this:

if (Close[-1] >Close[0])
EnterLongLimit(1, Close[-1], "Long-Entry");

short analog,

and to exit on the actual bar with:

if (BarsSinceEntry("Long-Entry") == 0 )

ExitLongLimit(Close[-1], "Exit Long", "Long-Entry");

In case of a reversion NT generates a close oder by itself and
I used some code to suppress strategy generated exit orders in this case.
But it still doesn't always work. NT suppresses some of the entry orders.
According to support managed orders are not able to deal with [-1].

May be an unmanaged order system helps me out-but I'm totally new to this approach and don't know
if that might work.

Reply With Quote
(login for full post details)
  #5 (permalink)
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 798 since Jun 2009
Thanks: 109 given, 799 received

It has been pretty well explained here: Buy on Close (Today) - NinjaTrader Support Forum

and in Sam's comments.

Use Excel or Matlab instead... something that doesn't care if you are violating reality .

Reply With Quote

futures io Trading Community Platforms and Indicators NinjaTrader > Buy on Close(Today)

Last Updated on March 2, 2011

Upcoming Webinars and Events

NinjaTrader Indicator Challenge!


Journal Challenge w/$1,800 in prizes!


Seven Trading Mistakes Solved With Smart Trading Tools w/Brannigan Barrett

Elite only

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