NexusFi: Find Your Edge


Home Menu

 





Own parameter form


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one ejzj1 with 3 posts (0 thanks)
    2. looks_two Big Mike with 2 posts (0 thanks)
    3. looks_3 Trader.Jon with 2 posts (0 thanks)
    4. looks_4 sam028 with 2 posts (1 thanks)
    1. trending_up 3,351 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 9 posts
    2. attach_file 0 attachments




 
Search this Thread

Own parameter form

  #1 (permalink)
ejzj1
NRW, Germany
 
Posts: 4 since Nov 2010
Thanks Given: 0
Thanks Received: 1

I want to capture the input parameters for an indicator of a C # form. The call of the OnBarUpdate method should be avoided until the form is closed.

My first idea was:
 
Code
public class ParmsForm : Form  
    public ParmsForm () 
    {
        this.Text = "C# - einfaches Form";      
        this.Size = new Size(600, 400); 
                        
        AddContextMenuAndItems();
                
        addControls();
                        
     }
}
I call the modal form from inside the OnStartup method:
 
Code
protected override void OnStartUp()
{
   ParmsForm parmsForm = new ParmsForm();
   parmsForm.ShowDialog();
}
The form is displayed. However, the OnBarUpdate method is called before the form is closed. My parameters are thus in the indicator is still not known.

Then i tried
 
Code
  DialogResult dr = parmsForm.ShowDialog();
   while(!parmsForm.IsDisposed)
           Thread.Sleep(10);
Same result as above.

Does anyone provide any solution or idea?

Eddy

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
NexusFi Journal Challenge - May 2024
Feedback and Announcements
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
How to apply profiles
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
45 thanks
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Bigger Wins or Fewer Losses?
24 thanks
Tao te Trade: way of the WLD
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,446 since Jun 2009
Thanks Given: 33,217
Thanks Received: 101,610


I think you can find some working examples from some old code from @piersh who made a Genetic Optimizer for NT 6.5. It was a strategy class code, but the actual code itself should be the same obviously for an indicator in regards to the form generation and input.

You can download it here and look at the source:


Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
ejzj1
NRW, Germany
 
Posts: 4 since Nov 2010
Thanks Given: 0
Thanks Received: 1

Hello Mike, thanks for the link.

I have the following problems:
1. After installation "PH Genetic " in "NT 7.01 Live" I can't select "PH Genetic" because i can not see an appropriate selection dialog.
2. Unfortunately, I do not find the place in the Sourcedcode where for e.g. the Form 'OptionsDialog: is invoked .

Do you have another tip?

Thanks, Eddy

Reply With Quote
  #5 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,446 since Jun 2009
Thanks Given: 33,217
Thanks Received: 101,610


ejzj1 View Post
Hello Mike, thanks for the link.

I have the following problems:
1. After installation "PH Genetic " in "NT 7.01 Live" I can't select "PH Genetic" because i can not see an appropriate selection dialog.
2. Unfortunately, I do not find the place in the Sourcedcode where for e.g. the Form 'OptionsDialog: is invoked .

Do you have another tip?

Thanks, Eddy

It was for NT 6.5, not 7, if I recall (since 7 has a GO already).

The point was to look at the source. Just look for forms or parameters with x,y coords, you can see it from there. I believe it's standard winform stuff, you could buy a book on it and get the basics.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #6 (permalink)
ejzj1
NRW, Germany
 
Posts: 4 since Nov 2010
Thanks Given: 0
Thanks Received: 1

My problem is not to create a WinForm. The problem is, how can i call a WinForm from inside the NT parameter dialog.

Reply With Quote
  #7 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


Big Mike View Post
It was for NT 6.5, not 7, if I recall (since 7 has a GO already).

The point was to look at the source. Just look for forms or parameters with x,y coords, you can see it from there. I believe it's standard winform stuff, you could buy a book on it and get the basics.

Mike

I use the PHGenetic in NT7 ... the native GO is slower in my estimation

Jon

Reply With Quote
  #8 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


Trader.Jon View Post
I use the PHGenetic in NT7 ... the native GO is slower in my estimation

Jon

Yes, but the native GO is reliable.
@Trader.Jon, didn't you find strange results with the PH Genetic GO ?

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
  #9 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


sam028 View Post
Yes, but the native GO is reliable.
@Trader.Jon, didn't you find strange results with the PH Genetic GO ?

sam,

Are you saying MORE reliable? In what way is the native GO better?

Jon

Reply With Quote
  #10 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629



Trader.Jon View Post
sam,

Are you saying MORE reliable? In what way is the native GO better?

Jon

I haven't use the PHGenetic gave me false results:
- take the optimal parameters found by the PHGenetic
- launch simple backtest with only these parameters
then compare the results of both.
You will have some surprises...

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on February 1, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts