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,
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 09:01 AM.
Reason: newer attempts still dont work as needed
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.
This just makes the optimizer always go in a logical order, like target 3 is not smaller than target 1.
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.
The following user says Thank You to Big Mike for this post:
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!
Last edited by Trader.Jon; October 23rd, 2010 at 01:00 PM.
Reason: added screenshots of optimizer and code
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
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.