Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

last price showing up instead of plot value

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

    last price showing up instead of plot value

    I've made a simple indicator just to use for MA I used 1 plot and have the values ranging from -3 to 3 (0 is the default and I tried hard-coding other values for testing... but still not working).

    The indicator displays proper values on charts but not in MA.

    Here is the jist of the code:

    protected override void Initialize()
    {
    Add(new Plot(Color.FromKnownColor(KnownColor.SteelBlue), PlotStyle.Bar, "Plot0"));
    CalculateOnBarClose = false;
    Overlay = false;
    PriceTypeSupported = false;


    }


    protected override void OnBarUpdate()
    {

    if (CurrentBar < 200) return;

    var = 0;

    if (something is true)
    {
    var = 1;
    }
    if(something is true)
    {
    var = 2;
    }
    if(something is true)
    {
    var = 3;
    }


    if(something is true)
    {
    var = -1;
    }
    if(something is true)
    {
    var = -2;
    }
    if(something is true)
    {
    var = -3;
    }


    Plot0.Set(var);
    }

    #2
    Dean, to have an identical setup to compare - have you used the same session times and bars back for the charts and MA?



    Please also check the CalculateOnBarClose settings for the indicator in both.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Yes I've done all that and have spent time combing through the forum. It seems that whenever someone else has had the same problem that there is no posted resolution.

      One other thing I noticed is that in the label of the MA it will have the name of my indicator followed by the words <unknown> for parameters BUT I do have parameters in it when I set it up.

      example: Indicator(<unknown>,<unknown>)

      Comment


        #4
        deanrumble,

        What is your bars lookback setting set to for the MA?
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          I've set it for 200, 201 then 500 etc., then I set my parameters to single digits...I've tested various inputs on the MA as well as changing my code to see if anything will work.
          Last edited by deanrumble; 04-01-2010, 05:37 PM.

          Comment


            #6
            Dean, since you have a high currentBars check in the indicator, please also test for higher lookBack values to see if this produces a different result - also have you tested your setup for example with a simple SMA indicator and see if those values would be aligned then?
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by GussJ, 03-04-2020, 03:11 PM
            12 responses
            3,239 views
            0 likes
            Last Post Leafcutter  
            Started by AveryFlynn, Today, 04:57 AM
            0 responses
            5 views
            0 likes
            Last Post AveryFlynn  
            Started by RubenCazorla, 08-30-2022, 06:36 AM
            3 responses
            79 views
            0 likes
            Last Post PaulMohn  
            Started by f.saeidi, Yesterday, 12:14 PM
            9 responses
            25 views
            0 likes
            Last Post f.saeidi  
            Started by Tim-c, Today, 03:54 AM
            0 responses
            5 views
            0 likes
            Last Post Tim-c
            by Tim-c
             
            Working...
            X