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


Dynamic Properties
Updated: Views / Replies:7,797 / 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

Reply
 4  
 
Thread Tools Search this Thread
 

Dynamic Properties

  #1 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received

Dynamic Properties

Hi to all,
I'm not a programmer and I learned C# only when I switched to NT. I believe only in automatic trading and I developed many strategies.
My strategies have all the bells and whistles except dynamic properties and this bugs me.
So my preposition is: If someone can show me how to do it I will post one of my strategies, which is more like a strategy template.
The strategy has:
1. Parameters population from a file
2. Entry restrictions
3. Different Stop Loss types
4. Different Trailing Stop types
5. Different Profit Target types
6. Break Even
7. Time restriction and much more

Baruch

Reply With Quote
 
  #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
Neubrandenburg, Germany
 
Futures Experience: Advanced
Platform: R
Favorite Futures: Stocks
 
wh's Avatar
 
Posts: 538 since Jun 2009
Thanks: 297 given, 480 received


File:

var1="value1"
var2='value2'

 
Code
                            
public static IDictionary ReadDictionaryFile(string fileName)
{
    
Dictionary<stringstringdictionary = new Dictionary<stringstring>();
    foreach (
string line in File.ReadAllLines(fileName))
    {
        if ((!
string.IsNullOrEmpty(line)) &&
            (!
line.StartsWith(";")) &&
            (!
line.StartsWith("#")) &&
            (!
line.StartsWith("'")) &&
            (
line.Contains('=')))
        {
            
int index line.IndexOf('=');
            
string key line.Substring(0index).Trim();
            
string value line.Substring(index 1).Trim();

            if ((
value.StartsWith("\"") && value.EndsWith("\"")) ||
                (
value.StartsWith("'") && value.EndsWith("'")))
            {
                
value value.Substring(1value.Length 2);
            }
            
dictionary.Add(keyvalue);
        }
    }

    return 
dictionary;

then read out dictionary

did not understand too

Causality is the relationship between an event (the cause) and a second event (the effect), where the second event is a consequence of the first.

Last edited by wh; March 5th, 2010 at 11:38 AM.
Reply With Quote
 
  #4 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received

wh hi,
I didn't understand what your code is supposed to do but I don't think that it answers my request.
What I want is like in zigzag indicator when you change the "use high and low" from true to false new property "price type" appears. Or like in "set order quantity" by changing from "by strategy" to "by default quantity".

Thanks,
Baruch

Reply With Quote
 
  #5 (permalink)
Elite Member
SE-Asia
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Amp
Favorite Futures: ES
 
Posts: 141 since Jun 2009
Thanks: 57 given, 114 received


baruchs View Post
wh hi,
I didn't understand what your code is supposed to do but I don't think that it answers my request.
What I want is like in zigzag indicator when you change the "use high and low" from true to false new property "price type" appears. Or like in "set order quantity" by changing from "by strategy" to "by default quantity".

Thanks,
Baruch

try this

public enum MMType
{
Fix_Percent,
Kelly_F

}

in Vars
private MMType mmtype;

in Properties

[Description("Money Management Type")]
[Category("Parameters")]
[Gui.Design.DisplayNameAttribute("l)Money Management Type")]
public MMType MonMType
{
get { return mmtype; }
set { mmtype = value; }
}

Hope that help

Reply With Quote
 
  #6 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received

Prtester,
Thanks, but this is not what I want. I have many Enums. What I want is one property to dictate if another property will be shown or hidden, like in the examples I provided.

Baruch

Reply With Quote
 
  #7 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received

I see that from all the c# gurus on this site no one knows how to do it.
Too bad.

Baruch

Reply With Quote
 
  #8 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,574 given, 3,983 received


baruchs View Post
I see that from all the c# gurus on this site no one knows how to do it.
Too bad.

Baruch

If the third answers (mine included) were wrong (ok, nobody had understood correctly the question), maybe the answer is: this is impossible.

If we check how it's done in the original official ZigZag for NT 6.5, we have this:

 
Code
                            
        [Description("If true, high and low instead of selected price type is used to plot indicator.")]
        [
Category("Parameters")]
        [
Gui.Design.DisplayName("Use high and low")]
        [
RefreshProperties(RefreshProperties.All)]
        public 
bool UseHighLow
        
{
            
get { return useHighLow; }
            
set 
            

                
useHighLow            value
                
PriceTypeSupported    = !value;
            }
        } 
The important points are maybe:
RefreshProperties(RefreshProperties.All)
which may refresh all the parameters window, and
PriceTypeSupported = !value;
which set or unset the price type choosen.

Example, when changing 1 parameter modify anther parameter:

 
Code
                            
        [Description("My Param")]
        [
Category("Parameters")]
        [
Gui.Design.DisplayName("Extra Parameter")]
        [
RefreshProperties(RefreshProperties.All)]
        public 
bool MyParam
        
{
            
get { return myParam; }
            
set myParam value; }
        }        
        
        [
Description("If true show extra param.")]
        [
Category("Parameters")]
        [
Gui.Design.DisplayName("Show Extra")]
        [
RefreshProperties(RefreshProperties.All)]
        public 
bool ShowExtraParam
        
{
            
get { return showExtraParam; }
            
set
            
{
                
showExtraParam      value;
                
MyParam                = !value;
            }
        } 

Success requires no deodorant! (Sun Tzu)

Last edited by sam028; March 6th, 2010 at 05:23 PM. Reason: typo
Reply With Quote
The following 3 users say Thank You to sam028 for this post:
 
  #9 (permalink)
Elite Member
Israel
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: pfg
Favorite Futures: eminis
 
Posts: 323 since Jun 2009
Thanks: 6 given, 206 received

Sam,
Thank you for trying, but this is not working.
I know that its possible but unfortunately its beyond my capabilities.
Please look at this link, maybe you can implement this for NT.
Dynamic Property Attribute Evaluation at Run and Design Time - CodeProject

Regards,
Baruch

Reply With Quote
 
  #10 (permalink)
Elite Member
Tel Aviv
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 1 since Oct 2009
Thanks: 1 given, 0 received

Implement Dynamic Properties in NT7


Hello Baruch,

I'd like to know if your offer is still valid.
I'm a C# programmer ready for the challenge, and will be happy to cooperate with you.

Thanks,
David

Reply With Quote

Reply



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 07:16 AM.

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-18 in 0.14 seconds with 20 queries on phoenix via your IP 54.163.209.109