V625 StrategyTester Optimization bug ObjectFind ??

 

I made an EA that when price passed a line condition for opening a trade was true

The level was found with

         if(ObjectFind("new_buy") != -1)
           {
           buyprice = ObjectGet("new_buy",OBJPROP_PRICE1);
              {
              if(pAsk >= buyprice)Openbuystop = true;
              } 
           }         

The EA was working well in testing lot of trades and on demoaccount

but moment I tried to optimize the settings with Optimization all results of optimization were no trades done

It was by using ObjectFind this happend

Changing the code

      if(IsOptimization())
         {
         if(GlobalVariableCheck("New_Buy "+Symbol()) != false)
           {
           buyprice = GlobalVariableGet("New_Buy "+Symbol());
              {
              if(pAsk >= buyprice)Openbuystop = true;
              } 
           }
         }     

using a globalvariable made the EA also doing the Optimization

 

try to

Print(GlobalVariableCheck("New_Buy "+Symbol()));

and see the result maybe it false

 
qjol:

try to

and see the result maybe it false


for what reason to do that globalvariable is working in optimization,

the problem i found was using function ObjectFind in optimization while it worked in normal test StrategyTester

 
deVries:


for what reason to do that globalvariable is working in optimization,



for debugging reasons only
 
qjol:

for debugging reasons only

Print is not done while you run optimization
 
I didn't know that i'm not using StrategyTester or optimization
 
qjol:
I didn't know that i'm not using StrategyTester or optimization
LOL...why are you answering...
 
deVries:


for what reason to do that globalvariable is working in optimization,

the problem i found was using function ObjectFind in optimization while it worked in normal test StrategyTester

The object is created by your EA ?
 
angevoyageur:
The object is created by your EA ?


yes it is, created by the EA. normally testing it did do all the trades,

with optimization you don't see a chart but also with same setting as in testing result of optimization was no trade in optimization

 
deVries:


yes it is, created by the EA. normally testing it did do all the trades,

with optimization you don't see a chart but also with same setting as in testing result of optimization was no trade in optimization

I supposed you checked that there is no error when creating your object.

 
angevoyageur:

I supposed you checked that there is no error when creating your object.


There was no error creating the object, outside optimization a normal function

i can show you the logic how i created the object if you Skype me