NexusFi: Find Your Edge


Home Menu

 





Buy on Close(Today)


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Mondrakete with 2 posts (0 thanks)
    2. looks_two MXASJ with 1 posts (0 thanks)
    3. looks_3 sam028 with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,458 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Buy on Close(Today)

  #1 (permalink)
Mondrakete
Germany
 
Posts: 24 since Feb 2011
Thanks Given: 1
Thanks Received: 0

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!

Stephan

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
  #3 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


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
  #4 (permalink)
Mondrakete
Germany
 
Posts: 24 since Feb 2011
Thanks Given: 1
Thanks Received: 0

-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
  #5 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800

It has been pretty well explained here: Buy on Close (Today) - [AUTOLINK]NinjaTrader[/AUTOLINK] 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




Last Updated on March 2, 2011


© 2024 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 - Privacy Policy - Downloads - Top
no new posts