• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Defining a constant

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

    Defining a constant

    Hi,

    I would like to define a constant in my indicator:
    For example:
    public const in UP = 1;
    public const in DOWN = 2;

    Thus, once I call my indicator (from another indicator/strategy I have) I will be able to check whether the value is UP or DOWN.

    1. Is there a way to do that?
    2. if so, what is the format I should use

    Regards,

    Ran

    #2
    Hello Ran,

    Thank you for your post.

    You will need to create a specific IDataSeries Class for the value you wish to access from another indicator or strategy. For a reference sample on this matter please visit the following link: http://www.ninjatrader.com/support/f...ead.php?t=4991

    Please let me know if you have any questions.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Examine userdefinedmethods.cs

      http://www.ninjatrader.com/support/h...ed_methods.htm

      edit - that may or may not work for variables

      Originally posted by rmaron View Post
      Hi,

      I would like to define a constant in my indicator:
      For example:
      public const in UP = 1;
      public const in DOWN = 2;

      Thus, once I call my indicator (from another indicator/strategy I have) I will be able to check whether the value is UP or DOWN.

      1. Is there a way to do that?
      2. if so, what is the format I should use

      Regards,

      Ran

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by seagraph, Today, 03:27 PM
      0 responses
      9 views
      0 likes
      Last Post seagraph  
      Started by dedouglas, Today, 02:54 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by elkhatabi, 08-01-2019, 06:36 PM
      5 responses
      50 views
      0 likes
      Last Post NinjaTrader_RyanL  
      Started by mr_trade, Today, 01:01 PM
      4 responses
      16 views
      0 likes
      Last Post mr_trade  
      Started by Renorail, Today, 12:31 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Working...
      X