Strategy Wizard Coding Question - futures io
futures io futures trading



Strategy Wizard Coding Question


Discussion in NinjaTrader

Updated by revtrader
      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 2,925 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 8 replies
    2. attach_file 1 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,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

Reply With Quote

Can you help answer these questions
from other members on futures io?
Macros for flatten and reverse
TradeStation
I have segregated my investment and trading
Psychology and Money Management
Where I can find knoxville divergence indicator for ninja trader 8?
NinjaTrader
Spoofing,Bluff Orders, Manipulation?
Emini and Emicro Index
Trade Summary Error
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on futures io
VWAP for stock index futures trading?
43 thanks
VWAP oscillator for NT8
15 thanks
Battlestations: Show us your trading desks!
12 thanks
Parabolic moves / lumber
7 thanks
Price Action Kewltech Style
7 thanks
 
(login for full post details)
  #2 (permalink)
Site Administrator
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,057 since Jun 2009
Thanks: 31,658 given, 95,054 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 Facebook 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, 923 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!

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:	109
Size:	168.1 KB
ID:	11391  
Reply With Quote
 
(login for full post details)
  #6 (permalink)
Site Administrator
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,057 since Jun 2009
Thanks: 31,658 given, 95,054 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 Facebook Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #7 (permalink)
Site Administrator
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,057 since Jun 2009
Thanks: 31,658 given, 95,054 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 Facebook 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


October 6, 2010


Upcoming Webinars and Events
 

An Afternoon With futures io member TropicalTrader

Elite only
     



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