Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

A simple question from a new NT programmer

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

    A simple question from a new NT programmer

    Hello everyone
    In spite of my poor english.....
    I was yesterday trying to write some basic indicators in NinjaScript (new for me)........I want to translate indicators developed in MetaStock........but when I tried to make something like 2*RSI or RSI+MACD (obviously writing it in C# way), the compiler told me that operator * or operator + where not applicable in the context
    I know is a very simple question, but, how is it suppossed I must write something like....

    double rsimacd

    rsimacd = rsi+macd

    Value.Set (rsimacd)

    Best Regards

    #2
    You could do something like:

    Code:
    double doubleRsi = RSI(14, 3)[0] * 2;
    Value.Set(doubleRsi);
    There are about 6 indicator development tutorials in the Help Guide. This is a great way to get started understanding the concepts behind indicator development using NinjaTrader.
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by 7robert, Today, 09:28 AM
    0 responses
    3 views
    0 likes
    Last Post 7robert
    by 7robert
     
    Started by 1001111, Today, 08:49 AM
    2 responses
    9 views
    0 likes
    Last Post 1001111
    by 1001111
     
    Started by KeenEdge, Today, 08:15 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Started by AndreaBhs, Today, 08:04 AM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by rehan, Today, 01:54 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Working...
    X