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 sam028 with 2 posts (1 thanks)
    3. looks_3 Big Mike with 2 posts (0 thanks)
    4. looks_4 Trader.Jon with 2 posts (0 thanks)
    1. trending_up 4,201 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 9 posts
    2. attach_file 0 attachments




 
Search this Thread
  #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?
Datafeed for Atas
Platforms and Indicators
Warsh Drops Easing Bias, December Hike Now Above 50% -- …
Prediction Markets & Event Contracts
Without Pulisic, USA 61.5% Live vs. Australia -- France …
Prediction Markets & Event Contracts
Would a node-based workflow for automated trading be useful?
Traders Hideout
Daytrading to swingtrading
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
BERN ALGOS algo trading journal
1 thanks
Afternoon-close session
1 thanks
Franks Trading Journey
1 thanks
Denied 20K payouts: Alpha Futures
1 thanks
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 R.I.P. 1977-2026 
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,586


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 X 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
 R.I.P. 1977-2026 
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,586


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 X 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 Administrator
 
Posts: 3,767 since Jun 2009
Thanks Given: 3,836
Thanks Received: 4,691


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)
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 Administrator
 
Posts: 3,767 since Jun 2009
Thanks Given: 3,836
Thanks Received: 4,691



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)
Reply With Quote
Thanked by:




Last Updated on February 1, 2011


© 2026 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 - Downloads - Top
no new posts