Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Variable to determine if indicator is running within Market Analyzer?

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

    Variable to determine if indicator is running within Market Analyzer?

    Market Analyzer has the ability to add an indicator as a column. Is there a flag or variable that the indicator can key off of to tell if it is running within Market Analyzer (as opposed to a normal chart?)

    I tried looking at something like "ChartControl == null", but this is inconsistent, when you pull up the parameters, etc.

    Any help is greatly appreciated!
    Daniel

    #2
    Hello neoikon,
    Thanks for posting today.

    After testing this using the ChartControl == null should be working when launching in the market analyzer.

    Can you send a sample of your script that shows when this is not working (inconsistent) as an exported script?

    1. From the Control Center window select the menu File > Utilities > Export NinjaScript to open the "Export NinjaScript" dialog window
    2. Select the option "Export selected source files"
    3. Enter a user defined file name
    4. Select all of the files that you want to export and either double click on them or press the ">" button
    5. A list of all files that will be exported
    6. Press the "Export" button to export the selected files
    7. A NinjaScript Archive File (.zip) file will be created in My Documents\<NinjaTrader Folder>\bin\Custom\ExportNinjaScript


    I look forward to your reply.
    Last edited by NinjaTrader_AlexG; 03-31-2015, 08:38 AM.
    Alex G.NinjaTrader Customer Service

    Comment


      #3
      Yes, it does work well in the case for Market Analyzer, but when that same indicator is used on a chart (where it resides most of the time), the ChartControl is still sometimes null (such as when you are pulling up the parameters), etc.

      Unfortunately, my script is a couple thousand lines long and isn't something I can share. But, thanks for the offer though.

      I was hoping there was a hidden flag set by NT that I could key off of.

      Comment


        #4
        Hello neoikon,
        Thanks for the reply.

        NinjaTrader does not have a hidden flag however their is a potential workaround using the ChartControl object.

        If you override the OnStartUp() method to include your check for the ChartControl object. This will perform the check only once prior to the start of your script processing the logic in OnBarUpdate() but after the Initialize() method.

        Here is a link to the help guide describing the OnStartUp() method.
        http://www.ninjatrader.com/support/h...?onstartup.htm

        Please let me know if this is able to work for your scripting needs.
        Alex G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by smk200, Today, 10:29 AM
        0 responses
        9 views
        0 likes
        Last Post smk200
        by smk200
         
        Started by Austiner87, Today, 09:44 AM
        2 responses
        19 views
        0 likes
        Last Post Austiner87  
        Started by TriGuy818, Today, 09:19 AM
        2 responses
        14 views
        0 likes
        Last Post TriGuy818  
        Started by 7robert, Today, 09:12 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by space_trader, Today, 09:11 AM
        2 responses
        25 views
        0 likes
        Last Post space_trader  
        Working...
        X