I have been wanting to add automated trading to my arsenal for some time now. I've been meaning to learn to code but, I just don't have the time right now and I'd like to start putting my EA concepts into action. Besides, someone with experience would generate cleaner code than I would probably come up with. Below is my summary and attempt at a logic description to describe this EA. If you are interested please let me know by response here or PM, whichever you feel is appropriate. All in all, I would like to develop about 20 EAs to be managed as a portfolio rather than trying to create one "holy grail" system. Diversify among strategies, spread risk, and optimize the aggregate performance of the portfolio is my philosophy to successful automated trading.
This expert advisor should be designed to set entry points in the market based on a cross of two Time Series Forecast indicators (same concept as an MA cross: more info on TSF here: http://www.forexfactory.com/showthread.php?t=28084) and manage positions. It has the ability to determine appropriate position size, place pending orders (or market orders), stop loss orders, take profit orders, move stops to break even, manage trailing stops and SAR (stop and reverse). It bases calculations on completed bars only (i.e. not current bar). It works on any type account (Standard, Mini, Micro) and any style broker (e.g. fractional pip / extra digit). It contains settings to dictate trade times (i.e. from 9:00 to 12:00; as user defined)
Entry IF:
TSF1 cross above TSF2 THEN place Pending Buy Order "X" pips above signal candle high
TSF1 cross below TSF2 THEN place Pending Sell Order "X" pips below signal candle low
Exit IF:
Take Profit Levels are hit
OR
Stop Loss is Hit
OR
IF Market order and opposite signal is received THEN set SAR (Stop And Reverse) Pending Order based on entry rules
OR
IF previous order is still Pending THEN remove that order and place new Pending Order based on new signal
OR
IF outside trading times remove all pending orders. Any open market orders should be managed according to rules until stop loss, take profit, or opposite entry is signaled to liquidate the position.
STOP Placement
Should be user definable variable
OR
ATR variable with multiplier capability (e.g. 7 period ATR gives value of 30 pips *multiplier of 2, would place stop 60 pips from entry)
Target Placement
Should be user definable variable (up to three separate target levels T1 T2 T3)
OR
ATR value based on same ATR used for Stop Loss with option of using different multiplier (or divider) (e.g. using above example ATR value = 30 /divider of 2, would place T1 @15 pips)
(T2 & T3 in ATR scenario are multiples of previous target at *1.62 e.g. T1=15; T2=24.3; T3=39.4)
Position Sizing
User defined lot setting
OR
Money Management Rules as follows (with user defined variable for Risk%) Position Size = (Account Equity) * (Risk%) / (Stop Distance) / (Pip Value)
Stop Management
- Should be able to move stop to Break even +/- buffer variable when user defined pip variable is reached
- Should be able to trail stop at user defined pip value with option to "Step" (e.g. If step selected, stop is only moved every "X" pips in profit)
Target Management / Position Scaling
Based on user settings, position should be liquidated evenly at each target (e.g. IF 3 Targets are defined THEN position should be liquidated in thirds at each level, IF 2 Targets position is halved, etc.)
Additional Variables
- Magic Number (user defined) capable OR Pair specific option
- Use Market Order instead of Pending option
- Signals Only - Disables Trading and only sends alerts at appropriate price levels
- Screen Shot option that takes screenshot on Entry/Exit and saves it to folder
- ECN Broker option in case broker requires stops and targets to be set after order is placed (I don't think it's a problem with pending orders, only market)
- Trade Times option to select when EA should monitor the market and place trades
- Minimum lot option if money management is used (e.g. if risk exceeds tolerance this would override to place minimum lot trade)
- Round Up (or Down) option should allow user to have money management round fractions up (or down) to nearest lot
- TSF period variable
- TSF Buffer to allow user to select pip value to place orders above high for longs (or below low for shorts) of signal bar
- Add Spread variable which if used adds spread to the TSF Buffer of long positions
Notes
The EA should only set/open positions once per signal (e.g. IF price triggers entry, retraces and bounces back to same entry signal it should not place additional trades) This is to prevent multiple entries being triggered by the same entry signal during price fluctuations
END Logic Description
This expert advisor should be designed to set entry points in the market based on a cross of two Time Series Forecast indicators (same concept as an MA cross: more info on TSF here: http://www.forexfactory.com/showthread.php?t=28084) and manage positions. It has the ability to determine appropriate position size, place pending orders (or market orders), stop loss orders, take profit orders, move stops to break even, manage trailing stops and SAR (stop and reverse). It bases calculations on completed bars only (i.e. not current bar). It works on any type account (Standard, Mini, Micro) and any style broker (e.g. fractional pip / extra digit). It contains settings to dictate trade times (i.e. from 9:00 to 12:00; as user defined)
Entry IF:
TSF1 cross above TSF2 THEN place Pending Buy Order "X" pips above signal candle high
TSF1 cross below TSF2 THEN place Pending Sell Order "X" pips below signal candle low
Exit IF:
Take Profit Levels are hit
OR
Stop Loss is Hit
OR
IF Market order and opposite signal is received THEN set SAR (Stop And Reverse) Pending Order based on entry rules
OR
IF previous order is still Pending THEN remove that order and place new Pending Order based on new signal
OR
IF outside trading times remove all pending orders. Any open market orders should be managed according to rules until stop loss, take profit, or opposite entry is signaled to liquidate the position.
STOP Placement
Should be user definable variable
OR
ATR variable with multiplier capability (e.g. 7 period ATR gives value of 30 pips *multiplier of 2, would place stop 60 pips from entry)
Target Placement
Should be user definable variable (up to three separate target levels T1 T2 T3)
OR
ATR value based on same ATR used for Stop Loss with option of using different multiplier (or divider) (e.g. using above example ATR value = 30 /divider of 2, would place T1 @15 pips)
(T2 & T3 in ATR scenario are multiples of previous target at *1.62 e.g. T1=15; T2=24.3; T3=39.4)
Position Sizing
User defined lot setting
OR
Money Management Rules as follows (with user defined variable for Risk%) Position Size = (Account Equity) * (Risk%) / (Stop Distance) / (Pip Value)
Stop Management
- Should be able to move stop to Break even +/- buffer variable when user defined pip variable is reached
- Should be able to trail stop at user defined pip value with option to "Step" (e.g. If step selected, stop is only moved every "X" pips in profit)
Target Management / Position Scaling
Based on user settings, position should be liquidated evenly at each target (e.g. IF 3 Targets are defined THEN position should be liquidated in thirds at each level, IF 2 Targets position is halved, etc.)
Additional Variables
- Magic Number (user defined) capable OR Pair specific option
- Use Market Order instead of Pending option
- Signals Only - Disables Trading and only sends alerts at appropriate price levels
- Screen Shot option that takes screenshot on Entry/Exit and saves it to folder
- ECN Broker option in case broker requires stops and targets to be set after order is placed (I don't think it's a problem with pending orders, only market)
- Trade Times option to select when EA should monitor the market and place trades
- Minimum lot option if money management is used (e.g. if risk exceeds tolerance this would override to place minimum lot trade)
- Round Up (or Down) option should allow user to have money management round fractions up (or down) to nearest lot
- TSF period variable
- TSF Buffer to allow user to select pip value to place orders above high for longs (or below low for shorts) of signal bar
- Add Spread variable which if used adds spread to the TSF Buffer of long positions
Notes
The EA should only set/open positions once per signal (e.g. IF price triggers entry, retraces and bounces back to same entry signal it should not place additional trades) This is to prevent multiple entries being triggered by the same entry signal during price fluctuations
END Logic Description