Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Coding a Makert On Close Order
Collapse
X
-
Coding a Makert On Close Order
I am developing a strategy that places short orders at the open and having trouble with using the wizrd to program the orders to place when time=9:29am. I am an experienced trader but I have no coding experience. I would like to code into my strategy an automatic cover on market close or at 3:55. It is important that the stocks are shorted and covered at the closest time possible. Any coding suggestions?Tags: None
-
Hi vt2009,
Thank you for your note.
What issues are you having with the entry time filter?
You may need to be a little more liberal with the time filter, instead of Time == 9:29am, maybe something like Time >= 9:29 and Time <= 9:31
More info at - http://www.ninjatrader-support.com/H...imeComparisons
When you apply a strategy, you will have the option to "Exit on close" with an option for how far away from the close, "Exit on close seconds"TimNinjaTrader Customer Service
-
So I have that in the wizard screen, the next step is coding in a variable for how many shares to short. I would like and even dollar ratio between 2 stocks so I guess the higher value one/lesser value one= ratio(variable). Then short 1000 of the higher price stock and 1000x the variable of the lower priced one.
Comment
-
Hi vt2009,
To have the code calculate this automatically, you will need to access the price of different instruments in a multi-instrument series.
More info at - http://www.ninjatrader-support.com/H...ameInstrumentsTimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ScottW, Today, 06:09 PM
|
0 responses
2 views
0 likes
|
Last Post
by ScottW
Today, 06:09 PM
|
||
Started by Board game geek, 10-29-2023, 12:00 PM
|
14 responses
244 views
0 likes
|
Last Post
by DJ888
Today, 05:38 PM
|
||
Started by Waxavi, 04-19-2024, 02:10 AM
|
4 responses
56 views
0 likes
|
Last Post
by sonia0101
Today, 04:02 PM
|
||
Started by cmtjoancolmenero, Today, 03:58 PM
|
0 responses
9 views
0 likes
|
Last Post Today, 03:58 PM | ||
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
11 responses
1,779 views
0 likes
|
Last Post
by aligator
Today, 03:54 PM
|
Comment