NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 12-14-2008, 04:54 PM   #1
ChiTrader2000
Senior Member
 
Join Date: Nov 2008
Posts: 160
Thanks: 0
Thanked 0 times in 0 posts
Default How can you place a stop order on or near the close for the next day's open?

Hello,

I am looking for some way to identify, inside my NinjaScript, that I am at the end of the current trading day. I would like to place a stop order at that time, that can be executed, at the earliest, on the open of the following trading day.

I could possibly check OnBarUpdate() of the 1 Minute Bars and see if Time[0] = ClosingTimeOfTheMarket, then place the stop order for the next day, but the problem is that there may be no trading for the last few minutes, and so Time[0] might never equal ClosingTimeOfTheMarket on a given trading day.

Also, I can't find any custom NinjaScript events like "OnClose()".

What are my options for placing a stop order at or near the end of the day, for execution on the next day, at the earliest?

Thank you very much in advance!

ChiTrader2000
ChiTrader2000 is offline  
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Place Buy order and Sell order at same time. robotics General Programming 38 08-07-2009 02:10 PM
Place Order in multiple Instrument laserjet ATM Strategies (Discretionary Trading) 3 12-11-2008 04:49 AM
How to not let strategy close open order on end of day? bonnyshi Strategy Development 2 10-08-2008 08:26 AM
Charting high/low/close and open/close widths gluebunny Charting 11 09-29-2008 10:47 AM
Previous Day's Close, High, Low Billy Valentine General Programming 2 04-13-2008 04:36 PM


All times are GMT -6. The time now is 11:54 PM.