Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

add-on sharing

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

    add-on sharing

    I've used an add-on (below) with a static value.

    Code:
    	public class ShareData : NinjaTrader.NinjaScript.AddOnBase
    	{
    		protected override void OnStateChange()
    		{
    			if (State == State.SetDefaults)
    			{
    				Description	= @"sharing add-on";
    				Name		= "SharingAddOn";
    			}
    			else if (State == State.Configure)
    			{
    			}
    		}
    	}
    
    	public static class SharedData 
    	{
    		public static double value;
    	}
    I have a chart that sets the value and a chart that gets the value. However periodically the value gets reset to zero possibly by NT.

    Any advise (NT8).

    #2
    Hello,

    Thank you for the question.

    I would be unsure based on what is provided what may be happening. Do you have a complete sample that includes the indicator or strategy and a specific set of steps that reproduces this?

    I could run the scripts and see if I notice what may be happening, based solely on what is provided I would guess that in one of the other scripts, it is resetting the variable at some point in the scripts life cycle.

    Please let me know if I may be of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      compiling one script can reset others e.g. add-ons but not always. this is the reason why the value was getting reset.

      so after editing/compiling the "get" chart script, need to reload the "set" chart script first then reload the "get" chart script (or simply restart NT).

      PS. really like NT8
      Last edited by futurenets; 03-17-2016, 11:52 AM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by yertle, Yesterday, 08:38 AM
      7 responses
      28 views
      0 likes
      Last Post yertle
      by yertle
       
      Started by bmartz, 03-12-2024, 06:12 AM
      2 responses
      20 views
      0 likes
      Last Post bmartz
      by bmartz
       
      Started by funk10101, Today, 12:02 AM
      0 responses
      4 views
      0 likes
      Last Post funk10101  
      Started by gravdigaz6, Yesterday, 11:40 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by MarianApalaghiei, Yesterday, 10:49 PM
      3 responses
      10 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X