Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,014 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Different values for indicators depending on WFOCycle #453313
07/19/15 17:08
07/19/15 17:08
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
What's happening, here?
Code:
function run() {
  if (is(INITRUN)) {
    BarPeriod = 60;
    BarOffset = 57;
    Weekend = 1;
    LookBack = 1001;
    StartDate = 20080101;
    EndDate = 20150301;
    NumWFOCycles = 169;
  }

  vars Price = series(price());
  if (Bar == 41712) {
    print(TO_ANY, strf("\nAt bar %d MMI17=%f.", Bar, MMI(Price, 17)));
  }
}


Select EUR/USD. Click Train. Observed:
Quote:
WFO: wfobug 2008..2015
At bar 41712 MMI17=50.000000.
At bar 41712 MMI17=50.000000.
At bar 41712 MMI17=50.000000.
At bar 41712 MMI17=50.000000.
At bar 41712 MMI17=50.000000.
At bar 41712 MMI17=50.000000.
At bar 41712 MMI17=50.000000.
At bar 41712 MMI17=50.000000.
At bar 41712 MMI17=50.000000.
At bar 41712 MMI17=31.250000.
Time 00:00:02
Expected: indicators to have the same values at the same bar, regardless of WFO cycle number.

Re: Different values for indicators depending on WFOCycle [Re: GPEngine] #453314
07/19/15 17:21
07/19/15 17:21
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
Here's another.
Code:
function run() {
  if (is(INITRUN)) {
    BarPeriod = 60;
    BarOffset = 57;
    Weekend = 1;
    LookBack = 406;
    StartDate = 20080101;
    EndDate = 20150301;
    NumWFOCycles = 169;
  }

  var rvi405 = RVI(405);
  if (Bar == 41712) {
    print(
      TO_ANY,
      strf("\nAt bar %d in Cycle %d RVI405=%f.", Bar, WFOCycle, rvi405));
  }
}

Train prints
Quote:

wfobug compiling.................
WFO: wfobug 2008..2015
At bar 41712 in Cycle 158 RVI405=-0.090028.
At bar 41712 in Cycle 159 RVI405=-0.090028.
At bar 41712 in Cycle 160 RVI405=-0.090028.
At bar 41712 in Cycle 161 RVI405=-0.090028.
At bar 41712 in Cycle 162 RVI405=-0.090028.
At bar 41712 in Cycle 163 RVI405=-0.090028.
At bar 41712 in Cycle 164 RVI405=-0.069675.
At bar 41712 in Cycle 165 RVI405=-0.763646.
Time 00:00:02

Re: Different values for indicators depending on WFOCycle [Re: GPEngine] #453321
07/20/15 15:37
07/20/15 15:37
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
There is certainly a natural explanation of that phenomenon. Thanks for the script, I'll look into that.

Re: Different values for indicators depending on WFOCycle [Re: jcl] #453322
07/20/15 15:46
07/20/15 15:46
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Ok - I believe you can also quickly find the natural explanation when you refine your print statement a little:

if (Bar == 41712 && !is(LOOKBACK)) {
print(...

laugh

Re: Different values for indicators depending on WFOCycle [Re: jcl] #453329
07/21/15 04:47
07/21/15 04:47
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
Ah. So smart. laugh

:et me toss you another one. What's happening in this case?
Code:
function run() {
  if (is(INITRUN)) {
    BarPeriod = 60;
    Weekend = 1;
    LookBack = 1001;
    StartDate = 20080101;
    EndDate = 20150301;
    NumWFOCycles = 169;
  }

  vars Price = series(price());

  var uo400 = UO(Price, 400);
  if (Bar == 41712 && !is(LOOKBACK)) {
    print(
      TO_ANY,
      strf("\nAt bar %d in Cycle %d UO400=%f.", Bar, WFOCycle, uo400));
  }
}

Quote:
Made with Gamestudio by oP group 2015
Monte Carlo plugin mounted


wfobug compiling.................
WFO: wfobug 2008..2015
At bar 41712 in Cycle 151 UO400=-0.594472.
At bar 41712 in Cycle 152 UO400=-0.594472.
At bar 41712 in Cycle 153 UO400=-0.594472.
At bar 41712 in Cycle 154 UO400=-0.594471.
At bar 41712 in Cycle 155 UO400=-0.594476.
Time 00:00:03

Re: Different values for indicators depending on WFOCycle [Re: GPEngine] #453330
07/21/15 06:38
07/21/15 06:38
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Same reason.

Cumulative indicators are affected by the amount of past data. For instance, the EMA will give you a different value dependent on whether you started it one month or two months ago. That's why we wait through the lookback period until we start trading. After that period, the indicator has stabilized and differences are negligible. But they are still there, up to infinity.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1