Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Coding a Makert On Close Order

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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

    Comment


      #3
      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


        #4
        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...ameInstruments
        TimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by minotti1, Today, 08:31 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by SmartArtsStudio, 05-15-2021, 10:46 AM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Airwave, Today, 06:02 AM
        2 responses
        18 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by bottakemoney, Today, 12:10 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by JGRtrader, Yesterday, 10:54 PM
        2 responses
        3 views
        0 likes
        Last Post JGRtrader  
        Working...
        X