Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, howardR), 1,001 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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 Offline
Support
Petra  Offline
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,726
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,726
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