Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/08/26 18:50
zorro with ccxt?
by opm. 03/03/26 03:17
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Quad), 15,262 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
CDLHammer #423382
05/28/13 22:42
05/28/13 22:42
Joined: Apr 2013
Posts: 107
UK
G
Geek Offline OP
Member
Geek  Offline OP
Member
G

Joined: Apr 2013
Posts: 107
UK
Just been playing around with the Hammer Candle pattern and just want to verify that my code is correct as i am still learning...It seems to be working correctly when back-testing etc.

Is this the way to go for entering trades via candle patterns?

Quote:
function run()
{

BarPeriod = 1440;
Margin = 50;
NumWFOCycles = 10;
NumBarCycles = 5;
StartDate = 2002;

vars Price = series(price());

Stop = 2*ATR(30);
TakeProfit = 2*ATR(30);

while(asset(loop("EUR/USD")))

if (CDLHammer())
enterLong();

plot("CDLHammer",CDLHammer(),NEW,BLUE);

}


Thank You!

Re: CDLHammer [Re: Geek] #423393
05/29/13 07:59
05/29/13 07:59
Joined: Jul 2000
Posts: 28,083
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,083
Frankfurt
Yes, that's correct. I would always use { } brackets for the while() loop though - not needed here as you have only one command in the loop, but when you add more, missing brackets could be a possible error source.

Re: CDLHammer [Re: jcl] #423403
05/29/13 11:39
05/29/13 11:39
Joined: Apr 2013
Posts: 107
UK
G
Geek Offline OP
Member
Geek  Offline OP
Member
G

Joined: Apr 2013
Posts: 107
UK
Many thanks.

Last edited by Geek; 05/29/13 11:54.

Moderated by  Petra 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1