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.

    Comment


      #3
      Examine userdefinedmethods.cs



      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 justin74444, Today, 03:50 AM
      0 responses
      2 views
      0 likes
      Last Post justin74444  
      Started by Pabulon, Today, 03:08 AM
      0 responses
      7 views
      0 likes
      Last Post Pabulon
      by Pabulon
       
      Started by sukhob, 05-18-2023, 08:26 PM
      2 responses
      128 views
      0 likes
      Last Post TraderJA  
      Started by timwey, Yesterday, 10:55 AM
      4 responses
      24 views
      0 likes
      Last Post timwey
      by timwey
       
      Started by DJ888, 06-28-2024, 10:18 PM
      3 responses
      39 views
      0 likes
      Last Post AdamDJ8
      by AdamDJ8
       
      Working...
      X