Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
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
2 registered members (AndrewAMD, howardR), 472 guests, and 7 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
round c++ #479476
04/02/20 00:45
04/02/20 00:45
Joined: Jan 2020
Posts: 32
L
leohermoso Offline OP
Newbie
leohermoso  Offline OP
Newbie
L

Joined: Jan 2020
Posts: 32
Hello friends!

When trying to use the bar function for Renko Zorro provide this function

Code
int Renko1(vars Open,vars High,vars Low,vars Close)
{
  Open[0] = round(Close[1],BarRange);
  if(Close[0]-Open[0] >= BarRange) {
    Close[0] = Open[0]+BarRange;
    High[0] = Close[0];
    Low[0] = Open[0];
    return 1;
  }
  if(Open[0]-Close[0] >= BarRange) {
    Close[0] = Open[0]-BarRange;
    High[0] = Open[0];
    Low[0] = Close[0];
    return 1;
  }
  return 4;
}


however, there is no round function in c++ that takes two arguments, how to circumvent that??

Best regards

Leo Hermoso

Re: round c++ [Re: leohermoso] #479479
04/02/20 08:00
04/02/20 08:00
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
In C++, use roundto(). That's a Zorro function.

Re: round c++ [Re: leohermoso] #479486
04/02/20 11:56
04/02/20 11:56
Joined: Jan 2020
Posts: 32
L
leohermoso Offline OP
Newbie
leohermoso  Offline OP
Newbie
L

Joined: Jan 2020
Posts: 32
Thank you, again!

Have a nice day


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