Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Compiling Error CS1501 -> Add Method

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

    Compiling Error CS1501 -> Add Method

    I'm a newbie in the NT-forum and I've seen there are many experts around.

    Currently I'm trying to port all my indicators and systems to C# Ninja script.

    One of my indicators for my intraday systems is the yesterday high-, low-, close-line and the today's open line.

    In the helpfile and in some samples I found out, that for this reason I have to use the 'Add' method with PeriodType-Class (Day) to create multiple timeframe dataseries.

    I copied the sample source code from the helpfile into the Initialze script to see
    how this methods are working:

    Add(PeriodType.Minute, 3);
    Add("AAPL", PeriodType.Minute, 1);

    But by compiling the code, the system fires the following message:

    No overload method for 'Add' takes 2 .. ( 3 ) .. Argruments -- error code CS1501

    What is wrong with this code - can anybody help me ?

    #2
    Add() logic as per below only is supported for strategies but not for indicators.

    Comment


      #3
      Many thanks for your quick answer ...

      but is there another way to show the yesterdays high-, low-, close- and todays open line with a indicator (or whatever) in a intraday chart?

      Comment


        #4
        You could try the PriorDayOHLC indicator http://www.ninjatrader-support.com/H...orDayOHLC.html

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        89 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        131 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        107 views
        0 likes
        Last Post CarlTrading  
        Working...
        X