What is the BestQuantity for Targets 1&2&3 = ?? - NinjaTrader Programming | futures io social day trading
futures io futures trading


What is the BestQuantity for Targets 1&2&3 = ??
Updated: Views / Replies:1,284 / 5
Created: by Trader.Jon Attachments:1

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
 
Thread Tools Search this Thread
 

What is the BestQuantity for Targets 1&2&3 = ??

  #1 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 176 received

What is the BestQuantity for Targets 1&2&3 = ??

Greetings,

I am trying to automate a backtest for the proper 'mix' of quantity per target for best results in the strategy Analyzer. Basics are:

1. 4 targets (PT1, PT2, PT3, PT4)
2. PT4 == runner so quantity is 1
3. QuantityPT1 + QuantityPT2 + QuantityPT3 <= 9

So in the optimizer I have a variable (BestQuantity) I can set to between 3 >> 9, that would interact with the values selected in the optimizer for the QPT1, QPT2, QPT3 ... ie:

BestQuantity 5;9;1
Quantity ProfitTarget1 0;9;1
Quantity ProfitTarget2 0;9;1
Quantity ProfitTarget3 0;9;1
Quantity ProfitTarget4 1;1;1

So ... if at a point the optimizer has BestQuantity =9 and also selected 7 for QPT1, then it has to select QPT2 + QPT3 == total of 2 in whatever 'mix' and so on to allow the optimizer to select the best result for whatever the # of times the ProfitTargets happen to be filled.

I can setup properties, but when I tried to make " BestQuantity = (QPT1 + QPT2 + QPT3);" I have error on compile::
Only assignment, call, increment, decrement, and new object expressions can be used as a statement,CS0201

An assist would be greatly appreciated,
Jon

update:
I managed to have a successful compile, but the logic is flawed

This is from the Strategy Analyzer Settings:
BestQuantity 16 (3;9;1),
Quantity ProfitTarget 1 4 (3;7;1),
Quantity ProfitTarget 2 6 (0;6;1),
Quantity ProfitTarget 3 6 (0;6;1),
Quantity ProfitTarget 4 1

As you can see, the 'BestQuantity' optimized result is the addition of the maximum values selected for optimization (6+6+4 = 16), instead of the 9 intended.
Code used was in 'Initialize' :: BestQuantity = QPT1 + QPT2 + QPT3 .. BestQuantity and the QPTs are int variables


Last edited by Trader.Jon; October 23rd, 2010 at 10:01 AM. Reason: newer attempts still dont work as needed
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)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,220 received


I'm having a hard time understanding your post. Perhaps screen shots, or c# code itself is in order.

But, I can tell you that when I design a strategy with multiple targets, I make those additional targets a cumulative total of the targets before them. This is just to make the optimizer make a bit more sense.

Target 1
Target 2 = Target1 + Target2
Target 3 = Target1 + Target2 + Target3

in code its basically
 
Code
                            


t1 
T1ticks
t2 
T1ticks T2ticks
t3 
T1ticks T2ticks T3ticks 
This just makes the optimizer always go in a logical order, like target 3 is not smaller than target 1.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following user says Thank You to Big Mike for this post:
 
  #4 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 176 received

Quantity Not Size Analysis


Big Mike View Post
I'm having a hard time understanding your post. Perhaps screen shots, or c# code itself is in order.

But, I can tell you that when I design a strategy with multiple targets, I make those additional targets a cumulative total of the targets before them. This is just to make the optimizer make a bit more sense.

Target 1
Target 2 = Target1 + Target2
Target 3 = Target1 + Target2 + Target3

in code its basically
 
Code
                            


t1 
T1ticks
t2 
T1ticks T2ticks
t3 
T1ticks T2ticks T3ticks 
This just makes the optimizer always go in a logical order, like target 3 is not smaller than target 1.

Mike

Thanks for the input. I am trying to analyse for the best quantity of each target size. The actual size of each target isnt a factor AFAIK in the solution I am looking for. Target sizes in the strategy do progress in size.

Attached a screenshot of the optimizer setup and output showing the optimized # of trades per target add up to (here it is 7+5+1=13) which is more than the limitation set up by the 'QuantitySQ3' of 9, or the Strategy Analyzer optimized amount of 8 . On screen also are the only parts of the code that are actually involved in the 'QuantitySQ3' == the int variables for the quantity for each target and the total quantity allowed by QuantitySQ3.

Input is greatly appreciated!
Jon

Jon

Attached Thumbnails
What is the BestQuantity for Targets 1&amp;2&amp;3 = ??-bestquantity.setup.png  

Last edited by Trader.Jon; October 23rd, 2010 at 02:00 PM. Reason: added screenshots of optimizer and code
Reply With Quote
 
  #5 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 176 received

NO solution

NT support suggests that this is too complex for the backtester to complete, and doesnt even suggest it is possible with custom programming. I still have a feeling that a custom optimization type might accomplish the job, so I havent given up ... just have other more urgent code to build ...

IF anyone has thoughts ... someone that sees how useful this might be .. maybe we can build something

Jon

Reply With Quote
 
  #6 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 176 received

Logically Optimization


Big Mike View Post

But, I can tell you that when I design a strategy with multiple targets, I make those additional targets a cumulative total of the targets before them. This is just to make the optimizer make a bit more sense.

This just makes the optimizer always go in a logical order, like target 3 is not smaller than target 1.

Mike

Mike,

I always did wonder why you did that progression. For clarification, does this actually make a difference during optimization even if my targets would be in a pregressive order anyway? ... and if yes, in what way.

I am wonder though that 'maybe' the idea of adding quantity values together in some type of subroutine might be a step towards accomplishing the optimization of quantity per profit target I am looking for.

Regards,
Jon

Reply With Quote

Reply



futures io > > > > > What is the BestQuantity for Targets 1&2&3 = ??

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
S&P500 index and S&P500 index futures correlation ocmsrzr Emini Index Futures Trading 15 October 9th, 2013 10:49 AM
US Inquiry Targets S&P Ratings of Mortgage Securities Quick Summary News and Current Events 1 August 18th, 2011 07:03 AM
T & S meyer99 Traders Hideout 2 June 2nd, 2011 01:06 AM
Order Flow & The Balance of Trade - Then & Now T1P1 Traders Hideout 11 May 24th, 2011 09:33 PM
Where oh where will the S&P go? Big Mike Traders Hideout 6 June 30th, 2010 08:22 PM


All times are GMT -4. The time now is 09:32 PM.

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-12 in 0.11 seconds with 20 queries on phoenix via your IP 54.221.93.187