Strategy tester. - page 6

 
When testing, objects are created, but when using ObjectGetValueByShift - 0 is returned
(not in tester works fine)

Maybe advise how to calculate the regression channel differently ?
 
Well<br/ translate="no">
there was: sar = iSAR(Currency,TPeriod,Step,Maximum,0); // all was quite lively replaced with: sar=iCustom(Currency,TPeriod, "zigzag",12,5,3,0,0); // horrible brakes


I've been saying everywhere that the standard ZigZag is undesirable to shove into an EA for backtesting. The grail will be ordinary.
 
<br / translate="no"> I say everywhere that the standard ZigZag is undesirable to shove into an EA for backtesting. The grail would be a regular one.

Apparently I haven't been everywhere :)
Motivate. It's not obvious from the code how it is used.
 
Recently I came to a conclusion how Zigzago-like indicators can be used in the tester (and in real life as well). It turns out (from logical considerations, I haven't tested it yet) - very simple. So simple that I wondered how I hadn't guessed it before. :)

And ZigZag, it's the same NRTR ... :))
Or trailing stop (the "chandelier" output) ... :))
Or entering on a pullback from the low ...
.......... etc. etc.

Basically it is all the same ... :)
 
Privet,

U menia sledus4aja situacija:

Paproboval ja sdelat' funkciju SetArrow() iz mt3 s pomos4ju ObjectFind()->ObjectDelete();ObjectCreate()->ObjectSet() v svajom custom indikator. Jiesli podkliu4aju indikator priamo k grafiku, vsio rabotajet i strelki risujetsia. I tried evo zapustit' 4erez iCustom() funkciju in eksperte i zapustit' 4erez tester i vylez takaya oshbybka:

Pri vyzove indikatora 4erez iCustom() funkciju ObjectFind() i ObjectCreate() in indikatore otkazalis' rabotat' in tester i vale. Strelki nirisujetsia, i indikator prekras4ajet work.

Po kodu oshbybki posmotrel v biblioteku stdlib, i tam eto vyvoditsia kak "unknown command" pri ObjectCreate().

The structure vyzova takaja:
ekspert->indikator->vyzovov svojej sdelannoj funkciji SetArrow(Time[shift],Price,Code,Color)->udalajem staruju strelku jiesli imia novoj strelku nie unikal'naja s pomos4ju ObjectFind()+ObjectDelete() jiesli da->doajem ObjectCreate() with imenenem stringa vziatovo iz Time, patom ObjectSet() param Objectrov dlia strelki.

Mozete poset' tam proisxit posle kampilirovanija?

Jiesli budet nuzna eta funkcija i sami ninapishyte, pribavliu posze. :-)

P.S. SetArrow() funkciji nigdeu v MT4, bylo by o4en' polezno jiesli ya by okazalas' v spiske standartnyx funkcijax. I jies4io: when zapuske expert/indikator v katorom jiest' ve4nyj loop, MT4 sozrajet vsie resursy i zavisajet, eto kak nibut' nuzno popravit'. Ideja nad etom - sdelat' parametr skol'ko ciklovno mozno byt' v te4enije adnoj sekundy, tipa CPU prioritet :-)
 
Vot sama custom funkcija SetArrow():

int ArrowSize=1; #include <stdlib.mqh> void SetArrow(datetime ArrowTime, double Price, double ArrowCode, color ArrowCollor) { int err; string ArrowName = DoubleToStr(ArrowTime,0); if (ObjectFind(ArrowName) != -1) ObjectDelete(ArrowName); if(!ObjectCreate(ArrowName, OBJ_ARROW, 0, ArrowTime, Price)) { err=GetLastError(); Print("error: can't create Arrow! code #",err," ",ErrorDescription(err)); return; } else { ObjectSet(ArrowName, OBJPROP_ARROWCODE, ArrowCode); ObjectSet(ArrowName, OBJPROP_COLOR , ArrowCollor); ObjectSet(ArrowName, OBJPROP_WIDTH , ArrowSize); ObjectsRedraw(); }



Po4emu eto nirabotajet 4erez iCustom() i rabotajet priamo iz indikatora nimogu poimat'... Mozete pamo4'?

 
Indicators called via iCustom do not draw anything anywhere.
iCustom can only return values from the indicator buffers.
In addition, you try to call the function through iCustom?
It is impossible ...
 
You need to save this function in a header file in the /include folder
Then insert it into your Expert Advisor/indicator
#include <stdlib.mqh>
and in the start() block you can refer to it as embedded.
I see it this way.
 
When running the tester I occasionally get a common error, what is it ?

Also strange multiline logs like :
<br / translate="no">
19:14:22 2004.02.27 10:37 Tester: take profit #5 at 1.2412 (1.2406 / 1.2410)
19:14:22 2004.02.27 10:38 Tester: take profit #5 at 1.2412 (1.2401 / 1.2405)
19:14:22 2004.02.27 10:39 Tester: take profit #5 at 1.2412 (1.2400 / 1.2404)
19:14:22 2004.02.27 10:40 Tester: take profit #5 at 1.2412 (1.2401 / 1.2405)
19:14:22 2004.02.27 10:41 Tester: take profit #5 at 1.2412 (1.2398 / 1.2402)
19:14:22 2004.02.27 10:42 Tester: take profit #5 at 1.2412 (1.2400 / 1.2404)
19:14:22 2004.02.27 10:43 Tester: take profit #5 at 1.2412 (1.2400 / 1.2404)
19:14:22 2004.02.27 10:44 Tester: take profit #5 at 1.2412 (1.2399 / 1.2403)
19:14:22 2004.02.27 10:45 Tester: take profit #5 at 1.2412 (1.2402 / 1.2406)
19:14:22 2004.02.27 10:46 Tester: take profit #5 at 1.2412 (1.2399 / 1.2403)
19:14:22 2004.02.27 10:47 Tester: take profit #5 at 1.2412 (1.2397 / 1.2401)
19:14:22 2004.02.27 10:48 Tester: take profit #5 at 1.2412 (1.2391 / 1.2395)
19:14:22 2004.02.27 10:49 Tester: take profit #5 at 1.2412 (1.2393 / 1.2397)
19:14:22 2004.02.27 10:50 Tester: take profit #5 at 1.2412 (1.2395 / 1.2399)
19:14:22 2004.02.27 10:51 Tester: take profit #5 at 1.2412 (1.2394 / 1.2398)
19:14:22 2004.02.27 10:52 Tester: take profit #5 at 1.2412 (1.2391 / 1.2395)
19:14:22 2004.02.27 10:53 Tester: take profit #5 at 1.2412 (1.2393 / 1.2397)
19:14:22 2004.02.27 10:54 Tester: take profit #5 at 1.2412 (1.2399 / 1.2403)
19:14:22 2004.02.27 10:55 Tester: take profit #5 at 1.2412 (1.2402 / 1.2406)
19:14:22 2004.02.27 10:56 Tester: take profit #5 at 1.2412 (1.2394 / 1.2398)
19:14:22 2004.02.27 10:57 Tester: take profit #5 at 1.2412 (1.2387 / 1.2391)
19:14:22 2004.02.27 10:58 Tester: take profit #5 at 1.2412 (1.2387 / 1.2391)
19:14:22 2004.02.27 10:59 Tester: take profit #5 at 1.2412 (1.2385 / 1.2389)
19:14:22 2004.02.27 11:00 Tester: take profit #5 at 1.2412 (1.2385 / 1.2389)
19:14:22 2004.02.27 11:01 Tester: take profit #5 at 1.2412 (1.2390 / 1.2394)
19:14:22 2004.02.27 11:02 Tester: take profit #5 at 1.2412 (1.2393 / 1.2397)
19:14:22 2004.02.27 11:03 Tester: take profit #5 at 1.2412 (1.2391 / 1.2395)
19:14:22 2004.02.27 11:04 Tester: take profit #5 at 1.2412 (1.2384 / 1.2388)
19:14:22 2004.02.27 11:05 Tester: take profit #5 at 1.2412 (1.2385 / 1.2389)
19:14:22 2004.02.27 11:06 Tester: take profit #5 at 1.2412 (1.2384 / 1.2388)
19:14:22 2004.02.27 11:07 Tester: take profit #5 at 1.2412 (1.2381 / 1.2385)
19:14:22 2004.02.27 11:08 Tester: take profit #5 at 1.2412 (1.2384 / 1.2388)
19:14:22 2004.02.27 11:09 Tester: take profit #5 at 1.2412 (1.2378 / 1.2382)
19:14:22 2004.02.27 11:10 Tester: take profit #5 at 1.2412 (1.2379 / 1.2383)
19:14:22 2004.02.27 11:11 Tester: take profit #5 at 1.2412 (1.2383 / 1.2387)
19:14:22 2004.02.27 11:12 Tester: take profit #5 at 1.2412 (1.2385 / 1.2389)
19:14:22 2004.02.27 11:13 Tester: take profit #5 at 1.2412 (1.2378 / 1.2382)
19:14:22 2004.02.27 11:14 Tester: take profit #5 at 1.2412 (1.2377 / 1.2381)
19:14:22 2004.02.27 11:15 Tester: take profit #5 at 1.2412 (1.2381 / 1.2385)
19:14:22 2004.02.27 11:16 Tester: take profit #5 at 1.2412 (1.2382 / 1.2386)
19:14:22 2004.02.27 11:17 Tester: take profit #5 at 1.2412 (1.2380 / 1.2384)
19:14:22 2004.02.27 11:18 Tester: take profit #5 at 1.2412 (1.2384 / 1.2388)
19:14:22 2004.02.27 11:19 Tester: take profit #5 at 1.2412 (1.2385 / 1.2389)
19:14:22 2004.02.27 11:20 Tester: take profit #5 at 1.2412 (1.2382 / 1.2386)
19:14:22 2004.02.27 11:21 Tester: take profit #5 at 1.2412 (1.2377 / 1.2381)
19:14:22 2004.02.27 11:22 Tester: take profit #5 at 1.2412 (1.2379 / 1.2383)
19:14:22 2004.02.27 11:23 Tester: take profit #5 at 1.2412 (1.2383 / 1.2387)
19:14:22 2004.02.27 11:24 Tester: take profit #5 at 1.2412 (1.2383 / 1.2387)
19:14:22 2004.02.27 11:25 Tester: take profit #5 at 1.2412 (1.2384 / 1.2388)
19:14:22 2004.02.27 11:26 Tester: take profit #5 at 1.2412 (1.2387 / 1.2391)
19:14:22 2004.02.27 11:27 Tester: take profit #5 at 1.2412 (1.2386 / 1.2390)
19:14:22 2004.02.27 11:28 Tester: take profit #5 at 1.2412 (1.2384 / 1.2388)
19:14:22 2004.02.27 11:29 Tester: take profit #5 at 1.2412 (1.2385 / 1.2389)
19:14:22 2004.02.27 11:30 Tester: take profit #5 at 1.2412 (1.2384 / 1.2388)
19:14:22 2004.02.27 11:31 Tester: take profit #5 at 1.2412 (1.2380 / 1.2384)
19:14:22 2004.02.27 11:32 Tester: take profit #5 at 1.2412 (1.2384 / 1.2388)
19:14:22 2004.02.27 11:33 Tester: take profit #5 at 1.2412 (1.2385 / 1.2389)
19:14:22 2004.02.27 11:34 Tester: take profit #5 at 1.2412 (1.2386 / 1.2390)
19:14:22 2004.02.27 11:35 Tester: take profit #5 at 1.2412 (1.2386 / 1.2390)
19:14:22 2004.02.27 11:36 Tester: take profit #5 at 1.2412 (1.2388 / 1.2392)



At the same time testing is clearly not working correctly.
This is not to offend the developers, but for the good of the cause - to make everything work properly as soon as possible.
 
In this case, testing is clearly not working correctly. <br / translate="no"> This is not to offend the developers, but for the good of the cause - so that everything would work properly as soon as possible.

We are just for this good - to bring the tester up to speed :)
Reason: