#1 (permalink)  
Old 11-05-2008, 06:58 AM
Freshman
 
Join Date: Nov 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Inkuumba is on a distinguished road
Default

Could some code the following into an EA for me


I will write in terms of long trades of course short trades uses the reverse of the logic.

Long Trades

1. Opening Positions

Suppose that a bull candle [LC] has just closed. The EA takes a trade on the new candle [NC], X pips above the closed price of [LC]. The stop loss is set Y pips below the closed price of [LC]. The EA must not trade a particle candle more than once.

If the current trade is still open the EA should take the next trade if the above conditions occur in the same direction if the last trade is in profit by P (P=0 means take the trade if not in profit). Otherwise, the EA closes all open trades and open the new trade in the reverse direction.

The maximum open trades should be set at some N( by me.)

2. Lot Size

Three options

a. L_u set by user ,or
b. L_r computed based on r% of balance(not equity), or
c. L=min[L_u,L_r]

3. Trailing Stops(Two options)

After BE pips the initial stop loss is moved to Entry price +L pips and triggers trailing.

opt 1(Individual Trailing stop)

Actual trailing is done by step trailing. That is trail until profit is TT pips and jump by JJ pips, wait again until profit reaches TT pips then jump again. When JJ=1 we get usual trailing stop

opt2(Common Trailing stop)
All previous stops are moved to the stoploss of new position and trail as individual trailing above.
4. Take Profit: TP

Scale out v1% of lot size at TP1
v2% of lot size at TP2
rest of lot size at TP3

5. Stochastic Filter

No long trades when Stochastic (r,s,t) on time frame TF is above level LH and below level LL.

6.EA Should trade between time xxxx and zzzz.

EA must work fast on all time frames

Please let me know
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with coding batalhadematos System Coding 7 11-01-2008 01:45 AM
MQL4 Coding robertinno Classified Ads 0 10-01-2007 10:12 PM
Coding Help needed yemupz Trading Systems 0 09-14-2007 03:30 PM
Need some help coding indicator martini5470 Indicator Coding 1 09-01-2007 04:01 AM
Coding an EA ossaossa System Coding 0 04-15-2007 01:25 AM


All times are GMT. The time now is 08:01 PM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0

Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now