• 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

NT8 Strategy and Indicator Difference

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

    NT8 Strategy and Indicator Difference

    what's the difference between strategies and indicators?

    I was planning to use an indicator that plots a series only when a strategy has a position but not sure how to do this? The strategy also uses the indicator for entry/exit decisions.

    am I right that strategies don't have series like indicators?

    Note: NT8 is fantastic!
    Last edited by delTik; 04-27-2016, 02:33 AM.

    #2
    Hello delTik,

    Thank you for your post.

    In NinjaTrader 8 you can plot from a strategy. For information on this please visit the following link: http://ninjatrader.com/support/helpG...tegy_plots.htm

    So you could have a strategy calculate the values for the plot and then check that series values for your conditions. You can also change the plot colors to Transparent to "hide" the plot from the chart when not in a position.

    For example:
    Code:
    		protected override void OnStateChange()
    		{
    			if (State == State.SetDefaults)
    			{
    				Description									= @"Enter the description for your new custom Strategy here.";
    				Name										= "Example1505868";
    				Calculate									= Calculate.OnBarClose;
    				EntriesPerDirection							= 1;
    				EntryHandling								= EntryHandling.AllEntries;
    				AddPlot(Brushes.Orange, "Example");
    			}
    		}
    
    		protected override void OnBarUpdate()
    		{
    			Values[0][0] = Close[0]; // your plot values here
    			
    			if (Position.MarketPosition == MarketPosition.Flat)
    				Plots[0].Brush = Brushes.Transparent;
    			else
    				Plots[0].Brush = Brushes.Orange;
    			
    			if (Values[0][0] > Open[0])
    				EnterLong();
    			else if (Values[0][0] < Open[0])
    				ExitLong();
    		}
    Patrick H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by harjinderjit, Today, 08:24 PM
    0 responses
    6 views
    0 likes
    Last Post harjinderjit  
    Started by Againmain1, Today, 03:04 AM
    1 response
    24 views
    1 like
    Last Post NinjaTrader_ShawnB  
    Started by jmahon, Yesterday, 11:44 PM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by Tomhgriff1, 01-03-2020, 04:07 AM
    4 responses
    47 views
    0 likes
    Last Post bkonia
    by bkonia
     
    Started by cary1267, Today, 09:37 AM
    1 response
    24 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Working...
    X