Strategy Wizard Coding Question - futures io
futures io futures trading



Strategy Wizard Coding Question


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Big Mike with 3 posts (0 thanks)
    2. looks_two njaisson with 3 posts (0 thanks)
    3. looks_3 revtrader with 1 posts (1 thanks)
    4. looks_4 max-td with 1 posts (0 thanks)
    1. trending_up 3,320 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 8 posts
    2. attach_file 1 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

Strategy Wizard Coding Question

(login for full post details)
  #1 (permalink)
Madrid
 
Experience: Intermediate
Platform: Ninja
 
Posts: 15 since Sep 2009
Thanks: 0 given, 0 received

Hello!

Using the NT wizard is there a way to flat all the positions taken before I open the strat whenever the time of the opening, so that it does not continue to trade positions taken before I open the strategy?

Many Thanks,

Nicolas

Started this thread Reply With Quote

Journal Challenge February 2021 results:
Competing for $1500 in prizes from Topstep
looks_oneSBtrader82 's Trading Journalby SBtrader82
(173 thanks from 31 posts)
looks_twoJust BEING a Trader: Letting Go!!by iqgod
(120 thanks from 33 posts)
looks_3Wisdom is Emptinessby Mtype
(68 thanks from 25 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(35 thanks from 17 posts)
looks_5Journal for peanuts1956by peanuts1956
(23 thanks from 13 posts)
 
 
(login for full post details)
  #2 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,764 since Jun 2009
Thanks: 32,302 given, 97,534 received


njaisson View Post
Hello!

Using the NT wizard is there a way to flat all the positions taken before I open the strat whenever the time of the opening, so that it does not continue to trade positions taken before I open the strategy?

Many Thanks,

Nicolas

Not 100% sure this is what you are looking for, but in Control Center, Tools - Options, there is a section for Strategies - NinjaScript:



Set it to "Wait until Flat" to make sure that once you add a strategy to a chart, the strategy will not open a new position until it is flat. In other words, if the strategy "should have been" long 5 bars before you added it to the chart, this will prevent it from thinking it is long and thus royally screwing up your account and getting out of sync.

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #3 (permalink)
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 924 received


But Mike, what you show here is NT7 !
that option is not available in NT 6.5.

maybe, nicolas, try to explain a bit better what you are looking for.

max-td
Reply With Quote
 
(login for full post details)
  #4 (permalink)
Madrid
 
Experience: Intermediate
Platform: Ninja
 
Posts: 15 since Sep 2009
Thanks: 0 given, 0 received

Cool man! Thanks for this. I was wondering as well what is the function in the wizard to close the strategy when a certain PnL has been reached. I am asking because I noticed that even if you code that it should exit long or short positions when PnL is inferior or superior to a certain value, it continues to place trades and immediately close them afertwards. This will be my last enquiry, promised!

Started this thread Reply With Quote
 
(login for full post details)
  #5 (permalink)
Madrid
 
Experience: Intermediate
Platform: Ninja
 
Posts: 15 since Sep 2009
Thanks: 0 given, 0 received

Nice results on CL yesterday in automated trading :-))

Attached Thumbnails
Click image for larger version

Name:	CL.jpg
Views:	131
Size:	168.1 KB
ID:	11391  
Started this thread Reply With Quote
 
(login for full post details)
  #6 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,764 since Jun 2009
Thanks: 32,302 given, 97,534 received


max-td View Post
But Mike, what you show here is NT7 !
that option is not available in NT 6.5.

maybe, nicolas, try to explain a bit better what you are looking for.

The part I highlighted is in 6.5 and is what I was talking about.

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #7 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,764 since Jun 2009
Thanks: 32,302 given, 97,534 received


njaisson View Post
Cool man! Thanks for this. I was wondering as well what is the function in the wizard to close the strategy when a certain PnL has been reached. I am asking because I noticed that even if you code that it should exit long or short positions when PnL is inferior or superior to a certain value, it continues to place trades and immediately close them afertwards. This will be my last enquiry, promised!

I've never used the wizard, but to my knowledge you can't do that in the wizard. There are plenty of examples of code on how to do this on the forum, you'll need to learn to code C# directly and forget the wizard.

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #8 (permalink)
Toronto
 
Experience: Intermediate
Platform: NinjaTrader, TOS
Broker: Rithmic
Trading: CL
 
Posts: 17 since Aug 2009
Thanks: 1 given, 9 received

I am trying to backtest the StochVolTrigger using Strategy wizard to create a simple buy/sell orders. Can someone tell me how I can use the NT wizard to automate a buy or sell when this indicator paints a green or red dot on the chart.

Reply With Quote
 
(login for full post details)
  #9 (permalink)
PA
 
Experience: Advanced
Platform: NT
 
revtrader's Avatar
 
Posts: 57 since Jul 2009
Thanks: 177 given, 43 received

Here is what I use in my strategies

protected override void OnBarUpdate()
{
if (Historical)
return;

I enter this first right under OnBarUpdate. in my code. This will not take any historical trades when applying the strategy to the chart.

Hope this helps

Reply With Quote
The following user says Thank You to revtrader for this post:


futures io Trading Community Platforms and Indicators NinjaTrader > Strategy Wizard Coding Question


Last Updated on October 6, 2010


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Call Option Buying: The New Pain Trade? w/Carley Garner

Elite only
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

New Challenge (TBD)

April
     



Copyright © 2021 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