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

Plots not working as expected.

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

    Plots not working as expected.

    I have these plots in my indicator

    PHP Code:
                    AddPlot(new Stroke(Brushes.Black1), PlotStyle.Dot"IFVG");
                    
    AddPlot(new Stroke(Brushes.Black1), PlotStyle.Dot"GapTop");
                    
    AddPlot(new Stroke(Brushes.Black1), PlotStyle.Dot"GapBottom");
                    
                    
    AddPlot(new Stroke(Brushes.White2), PlotStyle.Dot"InitialEntry");
                    
    AddPlot(new Stroke(Brushes.White4), PlotStyle.Hash"Entry");
                    
                    
    AddPlot(new Stroke(Brushes.Magenta4), PlotStyle.Hash"Stop");
                    
    AddPlot(new Stroke(Brushes.Lime4), PlotStyle.Hash"Target");

                    
    AddPlot(new Stroke(Brushes.Red1), PlotStyle.Hash"sFixed");
                    
    AddPlot(new Stroke(Brushes.Green1), PlotStyle.Hash"tFixed");
                    
                    
    AddPlot(new Stroke(Brushes.Black1), PlotStyle.Dot"SVert");
                    
    AddPlot(new Stroke(Brushes.Black1), PlotStyle.Dot"TVert");
                    
                    
    AddPlot(new Stroke(Brushes.Black1), PlotStyle.Hash"Bars2Inverse");    
                    
    AddPlot(new Stroke(Brushes.Black1), PlotStyle.Hash"SpeedOfInverse");    

                    
    AddPlot(new Stroke(Brushes.Black1), PlotStyle.Hash"Win");    
                    
    AddPlot(new Stroke(Brushes.Black1), PlotStyle.Hash"Loss");    
                    &
    #8203; 
    When I click on the indicator in the indicator window, the colors are correct
    Click image for larger version

Name:	image.png
Views:	27
Size:	107.4 KB
ID:	1295047

    buy when I add it, the colors are wrong.
    Click image for larger version

Name:	image.png
Views:	22
Size:	109.6 KB
ID:	1295048

    I have added and removed the indicator a bunch of times, but can get it to load right. It also plots wrong.

    HELP​​

    #2
    Also, the sFixed and tFixed appear to be Transparent instead of yellow since they show in the Data Box but aren't plotting on the chart

    Click image for larger version

Name:	image.png
Views:	20
Size:	45.7 KB
ID:	1295058​​​​
    Attached Files

    Comment


      #3
      Hello cre8able,

      Thanks for your post.

      What version of NinjaTrader are you using? Please provide the entire version number. This can be found under Help -> About (Example: 8.?.?.?)

      In the first screenshot of the first post, it seems that the indicator selected in the 'Available' section of the Indicators window is called 'IFVG' but in the second screenshot the indicator in the 'Configured' section is called 'IFVG_2023.03.09c'.

      Do you have two indicators where the "Name" property in State.SetDefaults is set to "IFVG"?

      In the screenshots you shared in the second post, it seems that both the Stop plot and the sFixed plot are plotting at the same exact value. It also seems that the Target plot and the tFixed plot are plotting at the same value.

      If you reduce the code in your script to comment out the Stop and Target plots, do you see the sFixed and tFixed plots plotting on the chart window?

      When testing the AddPlot() code you shared on my end, I see that the plot colors are the same when selecting the indicator in the 'Available' section and 'Configured' section. See the attached screenshots.

      I suggest creating a clean environment using the steps below and importing the indicator onto the clean environment and testing the indicator to see if the behavior persists.

      Creating a clean environment can be done by following the steps below:
      1. Close NinjaTrader 8, and rename the "NinjaTrader 8" folder in My Documents to something like: "NinjaTrader 8 OLD"
      2. Uninstall NinjaTrader from the Windows Control Panel and reinstall using the installer from account[dot]ninjatrader[dot]com
      3. Add the required indicator and test the indicator.​
      If you ever need to switch back to your original platform, you may do so by closing NinjaTrader and swapping the platform folder names.

      For example, Close NinjaTrader and rename the new "NinjaTrader 8" folder to "NinjaTrader 8 NEW" and the "NinjaTrader 8 OLD" folder to "NinjaTrader 8." Then restart the platform. Simply put: NinjaTrader 8 will always load the "NinjaTrader 8" folder in My Documents.

      We look forward to assisting further.​
      Attached Files
      Brandon H.NinjaTrader Customer Service

      Comment


        #4
        I was on 8.1.2.1

        I reloaded a clean version of NT and now the indicator seems fine

        thanks

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by burtoninlondon, Today, 12:38 AM
        0 responses
        2 views
        0 likes
        Last Post burtoninlondon  
        Started by AaronKoRn, Yesterday, 09:49 PM
        0 responses
        11 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Yesterday, 08:42 PM
        0 responses
        10 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Yesterday, 07:51 PM
        0 responses
        12 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,982 views
        3 likes
        Last Post jhudas88  
        Working...
        X