Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Loading the EMA Indicator BarsArray[2]

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

    Loading the EMA Indicator BarsArray[2]

    I am having an issue I can't explain.
    I'm walking through the debugger and when I run this on a live chart at State.DataLoaded I load two EMA indicators to two variables for references. Both are intended to be using the dataset BarsArray[2] which is on the 1 minute time frame.
    My first instance (named sema) loads as expected and in the debugger shows it's using the dataset from the 1 min time frame immediately after I load another (fema) with a different period also on the 1 minute time frame but for some reason this one loads using the dataset from my base chart a Volumetric 150 period tick. I don't get it.
    The function calls are literally the same and one right after the other.

    I have setup the strategy analyzer to see if I can reproduce it on another chart, but I don't get this error and the datasets all load as expected. Any thoughts on this? Since upgrading VisualStudio Code it just seems things are a bit off. But that's really the only change since Friday last week where everything was running fine. The entire 'obj' folder has been problematic today. I've tried just deleting the entire contents of x64 from this folder which contained the artifacts for Release and Debug. Can I just delete the entire 'obj' folder all together and recompile? Will this give me a cleaner slate to start on? Maybe my files are out of sync?


    This is the first loaded data:

    Click image for larger version  Name:	image.png Views:	0 Size:	55.4 KB ID:	1331844

    ​And then the second: (called fema)
    Click image for larger version  Name:	image.png Views:	0 Size:	62.3 KB ID:	1331845

    Not sure if it's related but I will note at some point through running the debugger I get this error and cannot compile anymore. I have to go delete the project debugger folders under 'obj' to resolve this
    Click image for larger version  Name:	image.png Views:	0 Size:	13.0 KB ID:	1331846​​
    Last edited by Cornhusk7789; 01-21-2025, 10:56 AM.

    #2
    Hello Cornhusk7789,

    While I am not able to assist with Visual Studio we can focus on what is running in NinjaTrader.

    Are the values from the fema series not matching the EMA using the same bars, interval, and date range on a chart?

    The compile error is due to building using Visual Studio.
    Delete the the Documents\NinjaTrader 8\bin\Custom\obj folder and don't build or run from Visual Studio.

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Interesting Visual Studio must be trying to compile it every time I open it for debugging. But good to know. I will remove that entirely.

      The 'fema' series is matching the data from the base chart.

      After I cleaned up the 'obj' folder and closed Visual Studio. Deleted the strategy from the chart. Restarted Ninja trader. Rebuilt the code. And then loaded the strategy to the chart without issue and the 'fema' finally looks right.

      I guess the symptoms all spawned from this 'obj' folder? That's the best I can pull from what I'm seeing.

      Comment


        #4
        Hello Cornhusk7789,

        Unfortunately I wouldn't be able to say on the input series. The AssemblyAttributes issue was caused by building in Visual Studio.

        I would only be able to address the values being incorrect in NinjaTrader.

        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        557 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X