Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
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
3 registered members (7th_zorro, Aku_Aku, 1 invisible), 579 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to use Traditional Candle Patterns #465123
04/03/17 13:19
04/03/17 13:19
Joined: Mar 2017
Posts: 2
Aquitaine
O
OIM Offline OP
Guest
OIM  Offline OP
Guest
O

Joined: Mar 2017
Posts: 2
Aquitaine
Hello,

I'm new Zorro users. I try to use the Traditional Candle Patterns include with zorro, but not work.

From what I understood some patterns returns 100 or -100 for a bullish or bearish signal.

But how should they be interpreted to make trades?

I am sending you my piece of code, hoping that someone can enlighten me on the procedure to follow.

Thank you.


Code:
#include <profile.c>

function run()
{
	NumCores = -2;		// use multiple cores (Zorro S only)
	BarPeriod = 60;
	StartDate = 2016;
	EndDate = 2017; // fixed simulation period
	BarZone = UTC; // Universal Time Coordinated
	LookBack = 24;
	NumWFOCycles = 10; // activate WFO
  	TradesPerBar = 2;

	// Déclaration des variables :
	var Signal1  = CDLAdvanceBlock(); // 100 ; -100

	// Stop Loss && TakeProfit :
	Stop       = (50 ) * PIP;
	TakeProfit = (100) * PIP;
	
	if(adviseLong(PATTERN,100,Signal1 > 0))
	enterLong();
	
	if(adviseShort(PATTERN,100,Signal1 < 0))
	enterShort();

	PlotWidth = 600;
	PlotHeight1 = 300;
	ColorUp = ColorDn = ColorWin = ColorLoss = 0; // don't plot candles and trades
	set(SPONSORED|PRELOAD|RULES|TESTNOW+LOGFILE);	
	}


Re: How to use Traditional Candle Patterns [Re: OIM] #465128
04/03/17 16:43
04/03/17 16:43
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
This is a strategy that trades with traditional candles:

Code:
function run()
{
  if(CDLAdvanceBlock() > 0)
    enterLong();
  else if(CDLAdvanceBlock() < 0)
    enterShort();
}


Re: How to use Traditional Candle Patterns [Re: jcl] #465129
04/03/17 16:49
04/03/17 16:49
Joined: Mar 2017
Posts: 2
Aquitaine
O
OIM Offline OP
Guest
OIM  Offline OP
Guest
O

Joined: Mar 2017
Posts: 2
Aquitaine
Quite simply !

Thank you laugh


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1