Hi
Have you parameters to optimize ?
Hi
Have you parameters to optimize ?
Hi Matutin,
Not sure what you mean but I do simple optimization:
Take profit = 100, step 50, finish 150.
When optimizing takes 0 trades.
extern int take_profit =100; extern int trailing_stop = 0; extern int stop_loss =600;
Hi. Matutin, thanks for looking.
No. I do not use IsOptimization(). Indicator not using it as well.
Unfortunately when optimizing it doesn't return any messages so I can not test and see what part of the code doesn't work and why it doesn't buy/sell.
Hi. Matutin, thanks for looking.
No. I do not use IsOptimization(). Indicator not using it as well.
Unfortunately when optimizing it doesn't return any messages so I can not test and see what part of the code doesn't work and why it doesn't buy/sell.
Did you run in testing with Take profit = 100, then with Take profit = 150 and have some trade ? May be those parameters don't fit ?
also, check with some Print the value returned by iCustom(NULL,0,"Tredlines",AlertsOn, Comments, TrendLine,0,0);
when in optimization()
Make sure you have an optimisation parameter ticked and if it is profit make sure the profit of your runs does not exceed the optimisation profit value. I think it ignores runs that exceed the optimisation profit value so I always make sure the profit is 1000,000,000. You can't have too much profit :)
Yep, I have used optimization in the past. Please see attached images.
Did you run in testing with Take profit = 100, then with Take profit = 150 and have some trade ? May be those parameters don't fit ?
also, check with some Print the value returned by iCustom(NULL,0,"Tredlines",AlertsOn, Comments, TrendLine,0,0);
when in optimization()
Unfortunately Journal returns nothing when optimizing. Do you know any way of getting a message out while optimizing?
It takes ages to do optimization. I think in optimization, iCustom has limited time to run the indicator and it is not enough time for indicator.
I will try to strip the indicator. Do you have any other ideas?
you can see many trades done on normal testing (visual mode is off)
no trades when optimizing.
All file functions work normally in optimization. Just output your debug messages to a simple text file.
kanaps,
Did you ever solve this problem? My original problem is, like yours, that Backtesting registers trades, Optimization registers ZERO trades. In debugging, I've realized my EA oddly doesn't create an OBJECT during "Optimization" (which it successfully creates during Backtesting). When I run "Optimization" and send the errors to a .txt file, according to the following code, I get error 4105 ("No order selected"). I'm confused--I believe I'm working with an OBJECT, not an ORDER.
I also fail to comprehend why this code successfully creates the OBJECT during Backtesting but fails during Optimization.
Any assistance would, as always, be greatly appreciated, jtd
ObjectDelete("T1"); if(!ObjectCreate("T1",OBJ_TREND,0, Time_1, Y_1, Time_2, Y_2) ) { int Error_code = GetLastError(); ...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi everybody!
I use custom indicator that draws trend lines. And I trade on brake of line.
Works fine on back testing but does 000 trades on optimization run.
Please advise on why it could happen and how can I go around it.
Thanks in advance.