Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Petra, AndrewAMD, Quad, VoroneTZ, 1 invisible), 488 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
rising() not working as I expect #472989
06/05/18 22:08
06/05/18 22:08
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
Maybe I'm not understanding the rising() function, but it seems to be detecting a falling pattern instead of rising.

This code is true when it actually falls.
-------------------------------------------------------
vars UL_Trend = series(LowPass(Price,20));
printf(" -- UL_Trend[%.2f]", UL_Trend[0]);
if(rising(UL_Trend+5)) {
printf(" -- UL_Trend Rising[%.2f]", UL_Trend[0]);
}

Printf results:
-------------------------------------------------------
[1: Tue 15-08-04 19:20] (209.37) -- UL_Trend[209.52]
[2: Wed 15-08-05 19:20] (210.06) -- UL_Trend[209.62]
[3: Thu 15-08-06 19:20] (208.36) -- UL_Trend[209.65]
[4: Fri 15-08-07 19:20] (207.96) -- UL_Trend[209.41]
[5: Mon 15-08-10 19:20] (210.57) -- UL_Trend[209.29]
[6: Tue 15-08-11 19:20] (208.67) -- UL_Trend[209.28]
[7: Wed 15-08-12 19:20] (208.92) -- UL_Trend[209.02] -- UL_Trend Rising[209.02]
[8: Thu 15-08-13 19:20] (208.66) -- UL_Trend[208.81] -- UL_Trend Rising[208.81]
------------------------------

Does rising(UL_Trend+5), actually mean the series rises to the "left" 5 bars, which means fall 5 bars before the current time?

Also, do all 5 bars need to be sequentially rising for rising to be true, or just "generally rising" or like positive slope.

Thanks!

Re: rising() not working as I expect [Re: SBGuy] #472991
06/06/18 06:22
06/06/18 06:22
Joined: Apr 2008
Posts: 586
Austria
Petra Online
Support
Petra  Online
Support

Joined: Apr 2008
Posts: 586
Austria
+5 means, the series begins with the 5th element.

Re: rising() not working as I expect [Re: Petra] #472997
06/06/18 16:59
06/06/18 16:59
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
Thanks Petra. I see. I read the manual carefully again, it appears to be a simple 2 data point comparision instead of some slope calculation across the +n lookback period.

So if I want to check if the series was been rising for the previous X bar, I would do:

rising(Trend) && rising(Trend+1) && rising(Trend+2) && rising(Trend+3)...

correct?

Thanks!

Re: rising() not working as I expect [Re: SBGuy] #472998
06/06/18 17:22
06/06/18 17:22
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Code:
rising(Trend) && rising(Trend+1) && rising(Trend+2) && rising(Trend+3)...


This is the same as...

Code:
(Trend[0] > Trend[1]) &&
(Trend[1] > Trend[2]) &&
(Trend[2] > Trend[3]) &&
(Trend[3] > Trend[4])...



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