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

No results on this simple code

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

    No results on this simple code

    A little bit frustrating and hope someone can quickly point out what I am doing wrong:

    This shows nothing on the chart:

    Code:
    			if (CurrentBar < 2);
    			{
    				return;
    			}
    				double Median = (Input[0] + Input[1] + Input[2])/(3*Input[2]);
    			
    				MedianRatio.Set(Median);
    Thanks for the help

    #2
    Hello Day Trading Fool,


    The issue here is likely the semi-colon at the end of the if statement. Corrected below:

    Code:
    if (CurrentBar < 2)
    {
    return;
    }
    double Median = (Input[0] + Input[1] + Input[2])/(3*Input[2]);
     
    MedianRatio.Set(Median);
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thank you very much =)

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by frenkmly, Today, 04:49 AM
      0 responses
      2 views
      0 likes
      Last Post frenkmly  
      Started by ETFVoyageur, Yesterday, 07:05 PM
      2 responses
      18 views
      0 likes
      Last Post bltdavid  
      Started by MGHORBEL, 05-06-2024, 06:41 AM
      4 responses
      22 views
      0 likes
      Last Post MGHORBEL  
      Started by ChastiJose, Today, 03:37 AM
      0 responses
      7 views
      0 likes
      Last Post ChastiJose  
      Started by Klaus Hengher, Today, 03:13 AM
      0 responses
      11 views
      0 likes
      Last Post Klaus Hengher  
      Working...
      X