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!
See more
See less

Partner 728x90

Collapse

Can this be done via Ninjascript?

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

    Can this be done via Ninjascript?

    Hello!

    I'm rather new to Ninja Trader. I'd like to semi-automate a strategy that I use. Can the following be done with Ninjascript? I think it can handle all of it, with the exception of possibly step 2/3.

    1) First, I'll identify when the setup occurs. This will happen manually.

    2) I'd like to have a tool, exactly like the fibonacci chart tool, to stretch between a high and low (manually done too).

    3) If I feel the pattern is developing correctly and everything is falling in place-- I hit either a Long or Short button and the script grabs the fibo-like-tool % values and properly puts in limit buys (in a long example) at those prices.

    4) Depending on the conditions, there may be 3 or 4 limit buy orders (all with a different number of contracts) placed at various % values of that fibo-like tool that I stretch on the chart in step #2. I'm trading futures and the number of contracts and the % (of the fibo high/low) value that they are placed at are always the same.

    5) As the prices pull back and the limit-buys start to fill, it may only get 1, or maybe it gets all 4. Depending on how far it pulls back.


    The rest of it is pretty routine and I'd imagine Ninjascript can easily do it. I.e. If 1 contract is entered, the exit is at X price, if 2 contracts are entered, the exits are X and Y. Stops are placed too, etc, etc.

    The trick, and what I'm wondering if it is possible. Can a fibo-like tool be made that automates the process after I hit the Long or Short button in step #3? At this point, Ninjascript would simply populate the order entries and manage the stops/exits.

    I'm currently doing this manually with the fibo tool. It isn't a real big deal. Only in fast markets, I can miss trades or takes me to long to sort out what gets sold at what price. It would be ideal if this is done automatically so I can just sit there and make sure the setup is right and automate the buying/selling without intervention.

    Additionally, perhaps I'd like a "break even" option. So I can tell the script to exit all positions at break even if the conditions calls for it.


    Thank you,
    Rick

    #2
    Hello Rick,

    Welcome to the NinjaTrader forums!

    I will have someone reply to you on Monday. Thank you for your patience.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi Rick, thanks for the patience - while you could programmatically access now values of a drawing object in NT7 (DrawObjects collection) you could unfortunately not add your custom drawing tool like you imagined. When you can trigger your orders with the inbuild tools, you can have your strategy check for a certain manually named drawing object tag Id to be present and thus place orders on your calculated values.

      BertrandNinjaTrader Customer Service

      Comment


        #4
        Thanks for the response. Sounds like I'll be doing it manually for now.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        1 view
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        6 views
        0 likes
        Last Post Javierw.ok  
        Started by timmbbo, Today, 08:59 AM
        2 responses
        10 views
        0 likes
        Last Post bltdavid  
        Started by alifarahani, Today, 09:40 AM
        6 responses
        41 views
        0 likes
        Last Post alifarahani  
        Working...
        X