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), 677 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

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