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

State of Indicators in Market Analyzer and NTMessage window

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

    State of Indicators in Market Analyzer and NTMessage window

    Hello fellow humans,
    I'm running into a weird issue. I've developed an indicator, which works as expected without errors.
    Now I want to use it inside the Market Analyzer (I have a specific plot to set the conditions etc.). The main logic and the conditions also work as expected.
    The two issues I'm running into are:
    1. I have certain logic which should only trigger on State.Realtime. Inside a chart the check for State == State.Historical works as expected, preventing said logic from being triggered on historical data.
      Inside the Market Analyzer however, this logic still gets executed. When I print the state, I get "Realtime" during historical data. The simplest way is to recreate this is to print the state within any indicator, add it to the marketanalyzer, use playback but on pause and load the column. You should see Realtime getting printed, when there is no Realtime data.
    2. When certain conditions are met, I'm showing a NTMessage like:
      Code:
      	if (ShowPullbackPopUp)
      	               ChartControl.Dispatcher.InvokeAsync(new Action(() => {
      	                   NinjaTrader.Gui.Tools.NTMessageBoxSimple.Show(Window.GetWindow(ChartControl.OwnerChart as DependencyObject), message, "SuperTrenderMA Message", MessageBoxButton.OK, MessageBoxImage.None);
      	               }));​
      Inside the Market Analyzer this causes the error that an object reference is not set and doesn't display the message. Is it in general not possible to display messages from within an indicator which is used in the market analyzer?

    #2
    Hello Human#102,

    For the first question that is currently an item that has been reported, you can track changes with that issue in the change log using the id 9420.

    The second item would be expected, there is no ChartControl when a chart is not present. You can invoke a messagebox by using the Log function with LogLevel.Alert.



    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Jonker, Today, 01:19 PM
    0 responses
    1 view
    0 likes
    Last Post Jonker
    by Jonker
     
    Started by futtrader, Today, 01:16 PM
    0 responses
    5 views
    0 likes
    Last Post futtrader  
    Started by Segwin, 05-07-2018, 02:15 PM
    14 responses
    1,791 views
    0 likes
    Last Post aligator  
    Started by Jimmyk, 01-26-2018, 05:19 AM
    6 responses
    844 views
    0 likes
    Last Post emuns
    by emuns
     
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    6 responses
    3,296 views
    1 like
    Last Post jgualdronc  
    Working...
    X