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
3 registered members (AndrewAMD, Quad, M_D), 1,217 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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: 11
S
sarmasboy Offline OP
Newbie
sarmasboy  Offline OP
Newbie
S

Joined: May 2019
Posts: 11
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:
Code
function run()
{
  StartDate = 2010;
  EndDate = 2019;
  LookBack = 10;
  BarPeriod = 1440;
  TimeFrame = frameSync(7);
  set(PLOTNOW);
  
  if(CDLEngulfing()!=0) {
	  printf("\nEngulfing at %s", strdate("%Y-%m-%d %H:%M", wdate(0)));
  }
  plot("Engulf",CDLEngulfing(),NEW+BARS,BLUE);

}

Re: candle pattern on weekly bars [Re: sarmasboy] #477997
08/23/19 13:20
08/23/19 13:20
Joined: Feb 2017
Posts: 1,726
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

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