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

displacing a line in an indicator

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

    displacing a line in an indicator

    EMAVal = EMA(Close, eMAP)[Displace];

    that is what i have if i set Displace to 0 it plots the line without being displaced but if i put it to 1 or higher i get no line. I dont understand why this wont displace and plot the line. Any help would be greatly appreciated.

    #2
    Hello Cbart1,

    You are likely running into this issue:
    Make sure you have enough bars in the data series you are accessing

    You can resolve by adding current bar check.

    if (CurrentBar < Displace)
    return;
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      thank you that is what it was. what does that really do then.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by sidlercom80, 10-28-2023, 08:49 AM
      168 responses
      2,262 views
      0 likes
      Last Post sidlercom80  
      Started by Barry Milan, Yesterday, 10:35 PM
      3 responses
      10 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by WeyldFalcon, 12-10-2020, 06:48 PM
      14 responses
      1,429 views
      0 likes
      Last Post Handclap0241  
      Started by DJ888, 04-16-2024, 06:09 PM
      2 responses
      9 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by jeronymite, 04-12-2024, 04:26 PM
      3 responses
      41 views
      0 likes
      Last Post jeronymite  
      Working...
      X