Performance of Calling Indicators with No Plots - NinjaTrader Programming | futures io social day trading
futures io futures trading


Performance of Calling Indicators with No Plots
Updated: Views / Replies:911 / 5
Created: by tornadoatc Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Performance of Calling Indicators with No Plots

  #1 (permalink)
Elite Member
Ft. Lauderdale Florida
 
Futures Experience: Intermediate
Platform: Tradestation
 
Posts: 16 since Apr 2010
Thanks: 31 given, 3 received

Performance of Calling Indicators with No Plots

Hello,

I am attempting to code Strategy which will call several other indicators. I am wondering if there is any overhead associated with the Plot logic that would not be used by my Strategy.

IOW, I am wondering if I should have Indicators that just perform necessary calculations and establish the necessary "get" Properties to retrieve the needed values.

I am guessing the answer is "no" as I don't see this mentioned anywhere.

Thanks for your time.

ATC

Reply With Quote
The following user says Thank You to tornadoatc for this post:
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,693 since Mar 2010
Thanks: 4,228 given, 25,795 received
Forum Reputation: Legendary



tornadoatc View Post
Hello,

I am attempting to code Strategy which will call several other indicators. I am wondering if there is any overhead associated with the Plot logic that would not be used by my Strategy.

IOW, I am wondering if I should have Indicators that just perform necessary calculations and establish the necessary "get" Properties to retrieve the needed values.

I am guessing the answer is "no" as I don't see this mentioned anywhere.

Thanks for your time.

ATC


@tornadoatc: This depends on the way you code your strategy. If you add an indicator via the Add() method, then you will effectively add a plot to your strategy, and that plot will be visible, when the strategy is activated on your chart or in the strategy analyzer. In that case there is an overhead associated as the plot is running.

Example:
 
Code
protected override void Initialize()
{
          Add(SMA(20));
}

adds an indicator to your strategy for the purpose of plotting it!


If you just call an indicator from OnBarUpdate(), then ChartControl has the value "null" when the indicator calculations are performed, and there should be no overhead associated with calling the indicator.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #4 (permalink)
Elite Member
Portland Oregon, United States
 
Futures Experience: Beginner
Platform: Ninjatrader®
Broker/Data: CQG, Kinetick
Favorite Futures: Gameplay Klownbine® Trading of Globex
 
Zondor's Avatar
 
Posts: 1,331 since Jul 2009
Thanks: 1,246 given, 2,661 received

Calling indicators with no plots.

If you calling an external indicator in OnBarUpdate, you should call a previously declared and instantiated, reusable instance of the external indicator.

Just as in an indicator, that instance of an external class can be created in OnStartUp, or in OnBarUpdate with a null test condition to ensure that the instance is not RE-created if it already has been created, ie is not null.

"If we don't loosen up some money, this sucker is going down." -GW Bush, 2008
“Lack of proof that something is true does not prove that it is not true - when you want to believe.” -Humpty Dumpty, 2014
“The greatest shortcoming of the human race is our inability to understand the exponential function.”
Prof. Albert Bartlett
Reply With Quote
The following 2 users say Thank You to Zondor for this post:
 
  #5 (permalink)
Elite Member
Ft. Lauderdale Florida
 
Futures Experience: Intermediate
Platform: Tradestation
 
Posts: 16 since Apr 2010
Thanks: 31 given, 3 received


Zondor View Post
If you calling an external indicator in OnBarUpdate, you should call a previously declared and instantiated, reusable instance of the external indicator.

Just as in an indicator, that instance of an external class can be created in OnStartUp, or in OnBarUpdate with a null test condition to ensure that the instance is not RE-created if it already has been created, ie is not null.

Thank you both for your input.

So following some of your previous postings that I believe you both may have contributed to I am creating an Indy that has the following
 
Code
#region Variables
        // Wizard generated variables
			private int    i_DMILen  = 14; 
        // User defined variables (add any user defined variables below)
			private ibdDM myDM; 
			private double v_DMIPlus 	        = 0 ; 
			private double v_DMIMinus 	= 0 ; 
			private double v_ADX 		= 0 ; 
		
        #endregion

        /// <summary>
        /// This method is used to configure the indicator and is called once before any bar data is loaded.
        /// </summary>
        protected override void Initialize()
        {
            Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "RankAllRaw"));
            Add(new Plot(Color.FromKnownColor(KnownColor.Green), PlotStyle.Line, "RankAllFast"));
            Add(new Plot(Color.FromKnownColor(KnownColor.DarkViolet), PlotStyle.Line, "RankAllSlow"));
            Add(new Line(Color.FromKnownColor(KnownColor.GhostWhite), 0, "ZeroLine"));
            Overlay				= false;
        
            CalculateOnBarClose = true ; 
		
	}

	protected override void OnStartUp()
	{
			myDM = ibdDM(i_DMILen) ; 
	}
		
		/// Called on each bar update event (incoming tick)
        protected override void OnBarUpdate()
        {		
			v_DMIPlus 	= myDM.DiPlus[0] ; 
			v_DMIMinus 	= myDM.DiMinus[0] ; 
			v_ADX 		= myDM.ADX[0] ;
So does this method of instantiating the above ibdDM indicator eliminate the overhead of associated Plots?

Also, other Indys I am working with have required inputs for Plot Colors. I tried to pass in "null but it did not like "null" in those instances so I just passed in Color.FromKnownColor(KnownColor.GhostWhite).

Thanks for your time and assistance.

Reply With Quote
 
  #6 (permalink)
Elite Member
Ft. Lauderdale Florida
 
Futures Experience: Intermediate
Platform: Tradestation
 
Posts: 16 since Apr 2010
Thanks: 31 given, 3 received

Possible Use of Partial Classes ?

While I am still learning C# (and probably will be for a long time) I am wondering if the use of a Partial Class might be of use for what I am trying to describe.

So I want to call other indicators / classes for use in more complex Indys or Strats. There are two issues currently wondering:
1) I do not want any overhead associated with Plot functionality
2) I sometimes only need most recent value of an Indy but the current implementation of that Indy might only be setup to return the entire DataStore. IOW, is it less efficient to return entire DataSeries (or even calculate them) if only most recent values are needed?

So, can these concerns be alleviated with use of a partial class? IOW, can I create a partial class where I would create calculations within a separate file that I can used over and over in other Indys or Strats? Can this class have multiple Properties that enable return of all the calculations I might need.

Ugg.

Thanks for your input.

Reply With Quote

Reply



futures io > > > > > Performance of Calling Indicators with No Plots

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

July Journal Challenge - $500 in Amazon Gift Cards!

July

Battlestations: $750 in prizes - Show us your trading desk!

August

TBA: FuturesTrader71 w/Morad Askar

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling an Optimization in a Strategy serac NinjaTrader Programming 17 September 2nd, 2015 02:25 PM
Performance impact of calling multiple instances of an external indicator Big Mike NinjaTrader Programming 12 June 27th, 2015 03:47 AM
Market Profile software and their indicators performance abtrader12 Emini Index Futures Trading 3 January 21st, 2013 08:30 PM
Ninjatrader indicators without plots jstnbrg NinjaTrader 6 March 2nd, 2011 01:14 AM
Null Plots kenz987 NinjaTrader Programming 7 May 10th, 2010 10:29 PM


All times are GMT -4. The time now is 01:39 AM. (this page content is cached, log in for real-time version)

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2018-07-21 in 0.12 seconds with 14 queries on phoenix