Dynamic Properties - NinjaTrader Programming | futures io social day trading
futures io futures trading

Dynamic Properties
Updated: Views / Replies:7,752 / 23
Created: by baruchs Attachments:4

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 90,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

Thread Tools Search this Thread

Dynamic Properties

  #21 (permalink)
Elite Member
Heidelberg, Germany
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: Stocks
Posts: 11 since Jun 2014
Thanks: 6 given, 12 received

Succeeded in updating the description as well. As a final step have gathered all the code into cut-and-paste sections with three utility methods for deleting a property, updating the name and updating the description. From the (attached!) example:

private void ModifyProperties(PropertyDescriptor[] properties)
  if (deleteAnotherProperty)
    DeleteProperty(properties, "DeletePropertyIfTrue");

  UpdateDisplayName(properties, "PropertyWithChangedName", "Property NEW Name");
  UpdateDescription(properties, "PropertyWithUpdatedDescription", "New property description.");
All the relevant code is boiler plate sections that can just be copied into a strategy. Commented to explain what everything does.

Caveat emptor: code tested, but I am not C# expert galore, it could be that I overlooked something somewhere.
But for now it works beautifully.

In the attached strategy is the complete example, with all of the code ready for cut and paste.

Attached Thumbnails
Dynamic Properties-exampledynamicproperties.jpg  
Attached Files
Register to download File Type: zip ExampleDynamicProperties.zip (3.2 KB, 65 views)
Reply With Quote
The following 3 users say Thank You to zr6bcm for this post:
  #22 (permalink)
Elite Member
Futures Experience: Beginner
Platform: NinjaTrader 7
Favorite Futures: CL, TF
grankus's Avatar
Posts: 8 since Aug 2012
Thanks: 5 given, 0 received

Thank you very much for all zr6bcm!

I think it's crystal clear now. I really appreciate your effort and thanks for the attached file with all the annotations.


Reply With Quote
  #23 (permalink)
Elite Member
Fukuoka-shi, Fukuoka-ken, Japan
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: Futures
Posts: 46 since Sep 2013
Thanks: 43 given, 20 received

I've been trying to implement this type of code in my strategy, but I've been trying to base it off the code found in this NinjaWorkShop strategy. It seems to be based off of the code in this thread by @jeremytang and @zr6bcm, but it is able to dynamically remove properties without cluttering the properties section with many additional 'trigger' properties. The actual strategy is quite complex as far as NT strategies go, so if someone could make a simple sample code for how this works I would really appreciate it.

For those interested, the strategy was found on the ninjatrader website here.

For a simple and a practical context, I think the sample should include a dropdown menu enabling an EMA crossover strategy, a MACD cross strategy, or both.

In this case the variables would be ema fast, ema slow, macdfast, macdslow, and macd smooth.

and should look something like this:

if ema cross is enabled then remove macdfast, macdslow, and macd smooth
if macd cross is enabled them remove ema fast and ema slow
if ema cross and macd is enabled then remove none

Attached Files
Register to download File Type: zip NinjaWorkShop1.0.zip (49.2 KB, 11 views)
Reply With Quote
  #24 (permalink)
Elite Member
Fukuoka-shi, Fukuoka-ken, Japan
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: Futures
Posts: 46 since Sep 2013
Thanks: 43 given, 20 received

I've found the answer to my own question. I did not add the ICustomTypeDescriptor class! After many hours of looking it over and retyping everything multiple times, it all came down to this. So if you're looking to add this to your strategy be sure to change this:
public class ShortTermPullback : Strategy

to this:
public class ShortTermPullback : Strategy, ICustomTypeDescriptor

Reply With Quote


futures io > > > > > Dynamic Properties

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Fib Lines S/R keepdchange NinjaTrader 10 May 8th, 2011 08:12 PM
Dynamic Stop Loss wallsteetking NinjaTrader Programming 2 March 7th, 2011 09:59 AM
Dynamic Range Indicator arjfca The Elite Circle 3 February 28th, 2011 06:18 AM
Draw object Properties kenz987 NinjaTrader Programming 1 November 10th, 2010 10:48 AM
Trading Hours in NT Properties togier Traders Hideout 4 August 18th, 2010 08:44 AM

All times are GMT -4. The time now is 08:58 PM.

Copyright © 2017 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 2017-12-13 in 0.08 seconds with 20 queries on phoenix via your IP