Gamestudio Links
Zorro Links
Newest Posts
The Black Book
by SteveG. 06/06/20 14:01
Indicator coding
by danatrader. 06/06/20 11:53
by Aku_Aku. 06/06/20 10:10
Reading a TXT file on server
by Truth. 06/05/20 18:22
Oanda instruments
by Morris. 06/05/20 10:24
MT4/5 - wrong M1 time
by Grat. 06/05/20 08:34
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
8 registered members (AndrewAMD, SteveG, Mio, 3run, Iglarion, danatrader, Grat, 1 invisible), 473 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Frank_Shieh, PBSeven, Hardi01, Giuseppe, AdamWu
18461 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: 983
AndrewAMD Online
AndrewAMD  Online

Joined: Feb 2017
Posts: 983
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.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1