• 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

Shared Variable

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

    Shared Variable

    I would like some help to determine which is the best way to proceed with using the output of one indicator as a parameter in several other indicators. The "publishing" indicator is rather cpu intensive so I want to avoid having multiple instances of it. I only need the value of the most recent bar so I feel as though it should be simple to store in a variable. I have read may threads on this site and others and there seems to be lots of suggestions with only minimal success. I understand that a good number of approaches are un-supported but any help in leading me down the best path would be greatly appreciate. I have looked into static variables, globalvariables.dll, userdefinedmethods etc and am unsure how to proceed. I am currently trying to implement a static variable but do not fully comprehend how to do it.

    #2
    Hello Taggart,

    Thank you for your note.

    Would this be something you could not use in the user defined methods?
    Take a look at the following link for more information: http://www.ninjatrader.com/support/h...ed_methods.htm
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the tip. I had mistakenly read "You can not share user defined methods created for custom strategies with custom indicators" to mean that it couldn't be used with custom indicators. Now that you have made me aware I will spend more time understanding this approach and hopefully achieve what I am looking for.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by martyn73, Today, 05:27 PM
      0 responses
      5 views
      0 likes
      Last Post martyn73  
      Started by MichaelAlexander, 02-22-2017, 05:06 AM
      5 responses
      1,402 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by walter739, Today, 11:56 AM
      3 responses
      10 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by kevinfloresz, Today, 09:46 AM
      4 responses
      29 views
      0 likes
      Last Post kevinfloresz  
      Started by digibob, 12-13-2019, 10:01 PM
      7 responses
      20 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Working...
      X