Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (JeyKey II, EvanTJ, Grant, LoT, EW_bytes), 8,613 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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: 938
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 938
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