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

Run only one time experts - is it possible?

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

    Run only one time experts - is it possible?

    In Metatrader, in addition to indicators and experts (like in Ninja) also present so called scripts. This is a kind of expert running only one time. Trader simply drag and drop desired script to main chart, script starting - doing its work - and immediatly exit after all done, exept cases when script have continious loop like while (true) { .... }

    Such kind of execution is very useful for example to close all opened or limit orders and in some other cases.

    Does Ninja have such feature? How can I run appropriate expert not all live time, but only once, manualy when it is nessesary for me?

    #2
    Zencoder, welcome to the forums! Unfortunately I am not aware of an indicator/strategy that would run just once and close out all positions/cancel all orders. You could possibly utilize the Automated Trading Interface and create an application to read in all positions and orders and take the appropriate action, but that would not be 100% within the NinjaTrader application.
    AustinNinjaTrader Customer Service

    Comment


      #3
      yes, but expert work continiosly after attaching them to the chart. Instead of this, I need just another thing: make a "short shot" - for example: close 12 orders during one second (while price is not go far away). So, haw can I do this onetime action if I have appropriate source code which doing this job?

      Comment


        #4
        Zencoder, calling a strategy "expert" from an indicator or such is not supported. You'll have to code to the Automated Trading Interface if you're looking to automatically cancel a bunch of orders.
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cmtjoancolmenero, Yesterday, 03:58 PM
        3 responses
        23 views
        0 likes
        Last Post cmtjoancolmenero  
        Started by Brevo, Today, 01:45 AM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by rjbtrade1, 11-30-2023, 04:38 PM
        2 responses
        73 views
        0 likes
        Last Post DavidHP
        by DavidHP
         
        Started by suroot, 04-10-2017, 02:18 AM
        5 responses
        3,021 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by Stanfillirenfro, Today, 07:23 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X