Skip to in visual mode different results?

 

Hi all,

I was playing around with an EA(kind of) to show me the total number of objects in a window. I used an Point and figure indicatos that uses boxes. Wnen I let the tester run at "normal speed" (slider at about 30), I get all the objects counted. However, if I hit "skip to" buttom, it stop counting when I hit the buttom, then give me zero object counted from that point on. I added a label to display the number of rectangles counted and the label also reset to zero. Here is the code for the EA start function:

int start()
  {
   int    obj_total=ObjectsTotal(OBJ_RECTANGLE);
   string str_object = obj_total;
   ObjectCreate("Obj_Total",OBJ_LABEL, 1, 0,0);
   ObjectSet("Obj_Total", OBJPROP_CORNER, 0);        
   ObjectSet("Obj_Total", OBJPROP_XDISTANCE, 5);         
   ObjectSet("Obj_Total",OBJPROP_YDISTANCE,15);    
   ObjectSetText("Obj_Total",str_object,10,"Arial",Red);
   log("########################################################");
   log("Object total is:"+obj_total);
   ObjectsDeleteAll(1,OBJ_RECTANGLE);
                 
   return(0);
  }

Here is the last portion of the print out without hitting "skip to" buttom:

2010.10.14 - 23:45:00 - - - ########################################################
2010.10.14 - 23:45:00 - - - Object total is:2084
2010.10.14 - 23:50:00 - - - ########################################################
2010.10.14 - 23:50:00 - - - Object total is:2084
2010.10.14 - 23:55:00 - - - ########################################################
2010.10.14 - 23:55:00 - - - Object total is:2084
2010.10.14 - 23:55:00 - - - ########################################################
2010.10.14 - 23:55:00 - - - Object total is:2084
2010.10.14 - 23:55:00 - - - Close the log file, FACC_5 finishes work...

Here the printout when using "skip to" buttom:

2010.10.07 - 23:30:00 - - - ########################################################
2010.10.07 - 23:30:00 - - - Object total is:244
2010.10.07 - 23:35:00 - - - ########################################################
2010.10.07 - 23:35:00 - - - Object total is:246
2010.10.07 - 23:40:00 - - - ########################################################
2010.10.07 - 23:40:00 - - - Object total is:246
2010.10.07 - 23:45:00 - - - ########################################################
2010.10.07 - 23:45:00 - - - Object total is:246
2010.10.07 - 23:50:00 - - - ########################################################
2010.10.07 - 23:50:00 - - - Object total is:246
2010.10.07 - 23:55:00 - - - ########################################################
2010.10.07 - 23:55:00 - - - Object total is:246
2010.10.08 - 00:00:00 - - - ########################################################
2010.10.08 - 00:00:00 - - - Object total is:246
2010.10.08 - 00:05:00 - - - ########################################################
2010.10.08 - 00:05:00 - - - Object total is:246
2010.10.08 - 00:10:00 - - - ########################################################
2010.10.08 - 00:10:00 - - - Object total is:246
2010.10.08 - 00:15:00 - - - ########################################################
2010.10.08 - 00:15:00 - - - Object total is:246
2010.10.08 - 00:20:00 - - - ########################################################
2010.10.08 - 00:20:00 - - - Object total is:246
2010.10.08 - 00:25:00 - - - ########################################################
2010.10.08 - 00:25:00 - - - Object total is:246
2010.10.08 - 00:30:00 - - - ########################################################
2010.10.08 - 00:30:00 - - - Object total is:246
2010.10.08 - 00:35:00 - - - ########################################################
2010.10.08 - 00:35:00 - - - Object total is:246
2010.10.08 - 00:40:00 - - - ########################################################
2010.10.08 - 00:40:00 - - - Object total is:0
2010.10.08 - 00:45:00 - - - ########################################################
2010.10.08 - 00:45:00 - - - Object total is:0
2010.10.08 - 00:50:00 - - - ########################################################
2010.10.08 - 00:50:00 - - - Object total is:0
2010.10.08 - 00:55:00 - - - ########################################################
2010.10.08 - 00:55:00 - - - Object total is:0
2010.10.08 - 01:00:00 - - - ########################################################
.
.
.
.
.
.
.
2010.10.14 - 23:40:00 - - - Object total is:0
2010.10.14 - 23:45:00 - - - ########################################################
2010.10.14 - 23:45:00 - - - Object total is:0
2010.10.14 - 23:50:00 - - - ########################################################
2010.10.14 - 23:50:00 - - - Object total is:0
2010.10.14 - 23:55:00 - - - ########################################################
2010.10.14 - 23:55:00 - - - Object total is:0
2010.10.14 - 23:55:00 - - - ########################################################
2010.10.14 - 23:55:00 - - - Object total is:0
2010.10.14 - 23:55:00 - - - Close the log file, FACC_5 finishes work...

In both occations the tester is set to run from 10/4/2010 to 10/15/2010 and the "skip to" is also set to 10/15/2010. Is it there any setting in the tester I need to set to avoid this? With other EA's I always hit the skip to to get the final results, but the EA goes thru all the bars. Is it different when using objects? It just jump to the end without counting what is in between?

Thanks

 
Skip to does nothing unless you click the Skip To button . . then the date from where it currently is to where the Skip to is set to is . . skipped. If you want to run from 10/4/2010 to 10/15/2010 and all the dates in between DON'T click Skip to.
 
RaptorUK:
Skip to does nothing unless you click the Skip To button . . then the date from where it currently is to where the Skip to is set to is . . skipped. If you want to run from 10/4/2010 to 10/15/2010 and all the dates in between DON'T click Skip to.


Hello Raptor,

I had the impression that "skip to" just fast forward to the date you specify in the date box next to the buttom. I always use it to go to Bar 0 fast and check the printouts for verification. The printouts shows the bars in between are not skipped, the indicators send its values to the EA and the EA send orders. If I check the results tab on the tester, the EA didn't skipped those bars, it actually send orders while "skipping". Any thoughts?

 

Thats because it doesn't skip the bars. It skips the Visual for those bars. Objects are usually treated as Visual Aids. If you're skipping Visual than for what do you need Objects. Thats how it thinks. The code could actually be written to avoid Object when isVisualMode() is off. That or the backtester stops objects when isVisualMode is Off. Either way. Blah.


 
ubzen:

Thats because it doesn't skip the bars. It skips the Visual for those bars. Objects are usually treated as Visual Aids. If you're skipping Visual than for what do you need Objects. Thats how it thinks. The code could actually be written to avoid Object when isVisualMode() is off. That or the backtester stops objects when isVisualMode is Off. Either way. Blah.



Thanks Ubzen, that's what I thought. I'm not trying to avoid objects, actually its the other way arround. Trying to find a workaround using indicators based on visual objects and don't use buffers (lines, trends, point anf figure is an example that uses rectangles objects). Just learning my way up. I guess I'll avoid hitting the "skip to" buttom while using objects.
 
ubzen:

Thats because it doesn't skip the bars. It skips the Visual for those bars.

Every day I learn something new here, thanks :-)
Reason: