Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (kzhao, AndrewAMD, bigsmack), 824 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
4 indicators #418366
02/24/13 08:41
02/24/13 08:41
Joined: Nov 2012
Posts: 209
S
SFF Offline OP
Member
SFF  Offline OP
Member
S

Joined: Nov 2012
Posts: 209
Here is Forex Strategy “4 indicators” with using ATR Stop.
It is a very high winning % on a EUR/USD 60 min bar and it is profitable although a low profit.

I have a problem with adding a dynamic exit which has 2 types based on a site below.
If someone could add it correctly, it would be great.
Please note that 90 Smoothed MA is identical to 179 EMA.

http://strategy4forex.com/strategies-based-on-forex-indicators/forex-strategy-4-indicators.html

Code:
function run()
{


	set(TICKS);
	
	int MA_Period = 179;
	int Wil_Period = 11;
	int CCI_Period = 12;
	int ATR_Period = 14;
	
	vars Close_Price = series(priceClose());
	
	vars MA = series(EMA(Close_Price,MA_Period));
	vars Wil = series(WillR(Wil_Period));
	vars CCIc =series(CCI(CCI_Period));
	vars ATRc = series(ATR(ATR_Period));
	
	if(Close_Price[0] > MA[0] && Wil[0] < -85 && CCIc[0] < -100 && ATRc[0] > 0.002)
	enterLong();
	
	if(Close_Price[0] < MA[0] && Wil[0] > -15 && CCIc[0] > 100 && ATRc[0] > 0.002)
	enterShort();
	

		
	Stop = 10*ATR(20);
	TakeProfit = 40*PIP;
     
}


Re: 4 indicators [Re: SFF] #418371
02/24/13 09:38
02/24/13 09:38
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
You can program an exit condition the same way as an enter condition, its then exitLong instead of enterLong.


Moderated by  Petra 

Gamestudio download | chip programmers | 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