Gamestudio Links
Zorro Links
Newest Posts
Can't plot daily high & low
by Junker. 10/13/19 23:51
Imgui Lite-c Development
by txesmi. 10/13/19 09:40
by Dooley. 10/11/19 18:53
Need Help Finding Cause of Crash
by Dooley. 10/11/19 18:51
What algorithm is used for BALANCED?
by JamesHH. 10/11/19 17:32
Votes for future features
by AndrewAMD. 10/11/19 14:12
Price not shown correctly via MT4 bridge
by gamadeus. 10/10/19 05:48
Loading Keybindings from a File
by Dooley. 10/10/19 03:44
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
5 registered members (Michael_Schwarz, YG8, kvm, JamesHH, 1 invisible), 637 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
FrankW, TedMar, raimucuk, vivaldi2, filip
18304 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
candle pattern on weekly bars #477995
08/23/19 10:10
08/23/19 10:10
Joined: May 2019
Posts: 10
sarmasboy Offline OP
sarmasboy  Offline OP

Joined: May 2019
Posts: 10
Hello all. I was wondering if it's possible to have candle patterns recognized using the in-built functions on weekly candles? I am using BarPeriod and TimeFrame, but it still seems to draw candles as if they were based on a daily candle, rather than weekly. Here's my code:
function run()
  StartDate = 2010;
  EndDate = 2019;
  LookBack = 10;
  BarPeriod = 1440;
  TimeFrame = frameSync(7);
  if(CDLEngulfing()!=0) {
	  printf("\nEngulfing at %s", strdate("%Y-%m-%d %H:%M", wdate(0)));


Re: candle pattern on weekly bars [Re: sarmasboy] #477997
08/23/19 13:20
08/23/19 13:20
Joined: Feb 2017
Posts: 768
AndrewAMD Online
AndrewAMD  Online

Joined: Feb 2017
Posts: 768
Bars and frames are two different things. Use frame() to check for a new frame. Your series() call will only add a new element when there is a new frame.

So yes, you want a weekly frame.

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

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

Powered by UBB.threads™ PHP Forum Software 7.7.1