Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,484 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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