How to use Traditional Candle Patterns

Posted By: OIM

How to use Traditional Candle Patterns - 04/03/17 13:19

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);	
	}

Posted By: jcl

Re: How to use Traditional Candle Patterns - 04/03/17 16:43

This is a strategy that trades with traditional candles:

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

Posted By: OIM

Re: How to use Traditional Candle Patterns - 04/03/17 16:49

Quite simply !

Thank you laugh
© 2024 lite-C Forums