NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM 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.

Reply
 
Thread Tools Display Modes
Old 01-22-2010, 09:41 AM   #1
Eddy-2d
Junior Member
 
Join Date: Apr 2009
Posts: 25
Thanks: 0
Thanked 0 times in 0 posts
Default simple strategy help

Hi,
I want to create a a strategy that buys on the bar open and sells on the bar close.
Can you show me how to do this with the strategy wizard?
Or just through the NT code?
Eddy-2d is offline  
Reply With Quote
Old 01-22-2010, 10:10 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Eddy-2d,

You need to determine trade logic to determine when you want to enter. Then it is just a matter of submitting the order. To close on bar close you will have to just check the percentage complete for the bar and as it approaches being 100%, submit your close order. It won't be exact open and exact close for your fills, but will be close enough when running with CalculateOnBarClose = false.
NinjaTrader_Josh is offline  
Reply With Quote
Reply

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
help with simple strategy stephenszpak Strategy Development 18 12-07-2009 07:57 AM
Simple question about a simple strategy. shakira Strategy Development 1 02-14-2009 10:56 AM
Simple strategy rnr123 Strategy Analyzer 1 10-17-2008 07:04 AM
need help with simple strategy mike8943 Strategy Development 1 07-17-2008 08:21 AM
Simple Strategy Oli Automated Trading 2 03-05-2007 11:42 PM


All times are GMT -6. The time now is 02:50 AM.