Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 600 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 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,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
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