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

Adding Buttons

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

    Adding Buttons

    Hi

    I would like to create a button that is visible within the chart window that when clicked would allow me to place a buy limit OCO "x" ticks above the market and a Sell Stop OCO "x" ticks below the market. Is it possible to create a GUI like this?

    Both of the above orders would be attached to two independent trading strategies. Therefore if the buy limit was hit it would trigger strategy number 1 and if the sell limit was hit it would trigger strategy 2, whilst cancelling the other order.

    Would the strategies need to be all inclusive inside the code for the button, for example, I would have button code, strategy 1 code and strategy 2 code all together as one big strategy?

    OR would you be able to activate the strategies "another way"?

    Additionally how different is a ninjatrader 7 strategy from a ninjatrader 8 strategy, any guidelines would be helpful.

    Cheers

    #2
    Hello,

    Thank you for the post.

    We have a simple example of adding buttons to a script at the following links:




    Regarding having independent strategies, this generally is not suggested and instead, your other comment about combining all logic would be suggested. This is so that your strategy knows what the other strategies logic is doing once you submit orders.You would need to have both strategies applied if you did separate strategies and if you wanted these to see each other you would need to devise logic to do that which would ultimately depend on what you are trying to do in each strategy.

    If you are just trying to submit manual entries and apply logic to them, I could suggest to instead look at the addon example and create your own tool which runs in the platform opposed to using multiple strategies. Using an addon you can submit manual orders and apply logic to those orders, or even submit orders based on some logic like a strategy. This is more similar to a tool like the superdom and how ATM strategies are applied to your orders.



    Regarding how different NT7 and NT8 are, well they are two different versions of the same software so 8 does have a lot of features that 7 does not. This is a fairly broad question, we do have a code breaking changes guide which can explain some of the NinjaScript differences here: http://ninjatrader.com/support/helpG...ng_changes.htm

    You could additionally review the Strategy development portion of the help guide to find all supported syntax.


    Please let me know if I may be of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello Jesse,

      2 questions:

      1) Can I use this code in NT 7?


      2) Is there some similar to this: AddOn Framework NinjaScript Basic, for NT 7? Or can I use this in NT 7 ?



      Thanks,
      Federico

      Comment


        #4
        Hello,

        Thank you for the reply.

        New items you locate in the NT8 help guide would not be available to NT7.

        NT7 was not created with addons in mind so there are no supported examples of modifying the GUI in NT7, you can find some various user submitted items on the forums here.


        NT7 uses windows forms for its GUI so if you are familiar with windows forms you could create content but there is no guide to this. Going forward with NT8 addons were created for users so they can develop tools and more advanced controls.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by franciscog21, Today, 05:27 PM
        0 responses
        2 views
        0 likes
        Last Post franciscog21  
        Started by hdge4u, 04-29-2024, 12:23 PM
        5 responses
        28 views
        0 likes
        Last Post MisterTee  
        Started by llanqui, 01-25-2024, 06:15 PM
        9 responses
        64 views
        0 likes
        Last Post MisterTee  
        Started by tradingnasdaqprueba, 05-07-2024, 03:42 AM
        16 responses
        65 views
        0 likes
        Last Post tradingnasdaqprueba  
        Started by Vulgoth_t_Destroyer, 05-09-2022, 04:45 PM
        55 responses
        5,464 views
        0 likes
        Last Post BartMan
        by BartMan
         
        Working...
        X