#1 (permalink)  
Old 11-05-2008, 06:58 AM
Currency Trader
 
Join Date: Nov 2008
Posts: 1
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

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB 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
MQL4 Coding robertinno Classified Ads 3 12-10-2011 06:04 PM
Coding an EA ossaossa System Coding 1 06-30-2009 06:47 PM
Help with coding batalhadematos System Coding 7 11-01-2008 12:45 AM
Coding Help needed yemupz Trading Systems 0 09-14-2007 02:30 PM
Need some help coding indicator martini5470 Indicator Coding 1 09-01-2007 03:01 AM


All times are GMT. The time now is 03:59 PM.

Registered members gain free access to online FOREX currency trading tools, foreign exchange software, Metatrader MT4/MT5 expert advisors, MT4 indicators and EAs. Register now