27 June: I have abandoned work on this project, at least for the meantime. The iCustom call to the external indicators seems to be crashing MT4 intermittently, and despite spending several hours trying to diagnose and fix the problem, I haven't been successful.
16 April: Finished coding just before my MT4 computer broke down. Will resume testing when I get the computer back from the repair shop.
14 April: Hope to complete the coding over the long weekend, and then begin testing when the markets re-open after Easter. Fingers crossed.
9 April 2017: Gotten delayed again. (FX is low priority for me, I have other software that I'm currently updating). Don't know when the EA will be completed.
30 March 2017: Back working on this EA now, I hope to have a beta version available within a couple of weeks.
14 March 2017: Unforeseen events in other business projects have forced me to shelve forex, including this EA, until further notice. Sorry for any inconvenience.
__________________
Can a basic trend following strategy be long term profitable?
Well, just for fun, over the next few days/weeks I'll be writing an EA ('Kasparov EA.ex4') with entries and exits that are based largely around the two little gems posted by mladen here and here. All credit and thanks to mladen.
Comments and questions are welcome, and I'll do my best to reply. However, please read the thread thoroughly before asking questions; they might have already been answered. My time is limited, and I'm not the world's most patient person. Also, I can't afford to have any aggro distracting my own trading: if there are too many unproductive comments from trolls, naysayers, blowhards or freeloaders, I'll discontinue the thread.
I will post the first draft of the Kasparov EA here when it is ready. Please be patient.
And please read the DISCLAIMER and TERMS AND CONDITIONS at the end of this post.
To give you an idea as to how the EA will operate, I've attached a template which I'm using as a starting point (see the 'Explanatory Notes' section below). Feel welcome to trade the system manually while waiting for the EA.
I will flesh out the rest of this post, so that it eventually includes full operating instructions for the EA, as the development proceeds. I'm not seeking suggestions; the settings will allow a lot of operational flexibility, allowing users to configure the EA to suit their requirements. Beyond that, if the EA doesn't meet your trading wish list, please move on.
Overview
Strategy-wise, Kasparov's rationale is to find the strongest trending pairs, either (1) automatically by using a strength meter (PSA), and/or (2) allowing manual override for any other analysis (e.g. fundamental, sentiment, momentum and/or S/R zones on daily chart -- anything you like). There is also an option for a long term trend filter.
IMHO, it's important to understand the strengths and weaknesses behind one's strategy. In this case, it is easy: if the instruments selected trend far enough, frequently enough, the EA will make money. During periods of sideways or indeterminate price movement, it will lose money. Hence success will depend significantly on the user's ability to select instruments with sustainable trends. Because price movement is essentially chaotic, I believe that the indicators used, and their settings, are less important than the broadbrush principles involved. Or put another way, Kasparov is not really a system in itself, rather it is a tool around which you can configure your own trend following system.
Entry timing: entry is made after the Fisher indy highlights a significant pullback on a shorter TF chart (currently I'm using M15), and then the BBstop indy indicates a breakout/resumption of the prevailing trend.
Exits: may be any combo of the following (whichever is triggered first):
(1) use of BBstops as a trailing SL (this is set to a longer TF to allow profits to run, complementing the 'trend following' rationale),
(2) standard move to BE and pip-based trailing SL;
(3) protective SL (options: fixed price; pips; ADRs; swing point+pips);
(4) TP (options: fixed price; pips; R-multiples);
(5) manual adjustment of SL/TP or (partial or full) close.
MM: RiskPerTrade (options: #lots; $$; %equity/balance/free margin; true leverage; ADR$); Max simultaneous orders per symbol; max simultaneous orders per currency; max drawdown allowed (no more entries if %equity or $$ lost in last X hours).
Operational Notes
The Kasparov EA must be attached to only ONE price chart. No matter what the chart's instrument/symbol is, it will place orders on the instruments that you specify, checking the entry criteria for each instrument at the close of the candle of the chart on which it is attached (the 'setup' or 'trigger' candle). If all required criteria are met, an order will be placed on the opening tick of the next candle. Kasparov will also manage orders for any instrument where the order's magic number matches the magic number(s) that you've set in the EA parameters, on every new price tick.
If you are using the PSAfilter, the PSA indicator must be attached to its own dedicated chart.
EA Parameters (a work in progress, I will flesh these out further over the coming days):
// Global settings
//----------------
string EAname = "Kas-";
Gets pasted into the Comment field for each order generated by the EA
Note: the EA also populates the Comment field with the:
instrument symbol, e.g. USDJPY;
risk per trade entry, e.g. 1%E;
magic# inside square brackets, e.g. [14751];
the instrument's PSA value, if PSA filtering is being used, inside curly braces, e.g. {-562.00}
// Instruments to trade, direction and size
// ----------------------------------------
string RiskPerTrade = "1%E";
Input must be one of the following:
# = number of lots
$ = dollar amount to risk
%E = % equity to place at risk*
%B = % balance to place at risk*
%F = % free margin to place at risk*
: = %risk per 100 pips
& = %risk per ADR pips
[* these require an initial SL to be set (see SLmethod parameter)]
Martingale option: increase/decrease position risk however you wish, by separating up to 20 entries (martingale steps) by commas. The EA determines the step number by counting recent consecutive losses from closed orders that were initiated by Kasparov, across all instruments traded; after all steps have been exhausted, or a winning trade occurs, they start over from the beginning, e.g. to double up to a max of six steps, use something like: 1%E, 2%E, 4%E, 8%E, 16%E, 32%E
string InstrumentsToTrade = "EU+1,EJ+2";
List of which instruments to trade. Up to 50 items, separated by commas.
Acceptable shorthand: A=AUD, C=CAD, E=EUR, F=CHF, G=GBP, J=JPY, N=NZD, U=USD, *=all 28 currency pairs; other symbol IDs (exotics, metals, indices, etc) must be typed in full
+ = place buy orders only for this instrument
- = place sell orders only for this instrument
neither + nor - = may place either a buy or a sell order (depending on other criteria being met)
To have neither buy nor sell orders placed, simply omit the instrument from the list
Numeric value is a multiplier for RiskPerTrade, e.g. the above example would risk 1%E for EURUSD and 2%E for EURJPY; if omitted, defaults to 1
NOTE: the Kasparov EA is ambitious, in the sense that it attempts to both open and close orders from multiple instruments/pairs, while running off just one chart. It is strongly recommended that you limit the number of InstrumentsToTrade to just a few currency pairs. Specifying a large number of instruments will likely cause MT4 to run very slowly, delaying the placement of orders and hence possibly causing additional slippage.
string AllPairsScratchpad = " GU,UF,EU,UJ,UC,NU,AU,AN,AC,AF,AJ,CJ,FJ,EG,EA,EF,EJ,EN,EC,GF,GA,GC,GJ,GN,NJ,NC,CF,NF";
List of 28 major currency pairs. This setting is ignored by the EA, it is there to allow you to easily copy/paste it into InstrumentsToTrade (or set it to any text you wish)
string PSAfilter = "Kas1,1000,999999";
Default setting means that buy orders will be placed for instruments with PSA values between +1000 and +999999; sell orders for instruments with PSA values between -1000 and -999999; and no orders will be placed for instruments with PSA values between -1000 and +1000
If parameter is left blank, there is no restriction, i.e. instruments listed in InstrumentsToTrade that meet all other criteria will be traded
The first parameter is the link from the relevant PSA indicator's Unique ID setting, allowing the EA to know which PSA's displayed values to use in its calculations (because you might have multiple PSA indicators, on different charts)
[NOTE: You can use your own strength meter instead of PSA, provided that you amend it to update Global Variables named @PSA-xxx-symbol-01 with the strength value, where xxx matches the first entry in the PSAfilter, and symbol is the instrument ID (e.g. EURUSD). If the strength value currently lies between the second and third entries of PSAfilter, Kasparov will place orders for this instrument (if all other criteria are met)].
string BBstopsTrendFilter = "240,10,0.5,false,0.5,0,0,false";
If non-blank, mladen's BBstops indy will be used as trend filter, i.e. instrument will be traded only in the same direction as the filter.
It takes 8 inputs, separated by commas, as follows:
1. Time frame (integer: 0=current, 1=M1, 5=M5, 15=M15, 30=M30, 60=H1, 240=H4, 1440=D1, 10080=W1, 43200=monthly)
2. Bands period (integer)
3. Bands deviation (decimal number)
4. Bands deviation with sample correction? (true/false)
5. Bands risk (decimal number)
6. Bands average type (integer: 0=SMA, 1=EMA, 2=SMMA, 3=LWMA, 4=TEMA)
7. Price (integer: 0=close, 1=open, 2=high, 3=low, 4=median, 5=typical, 6=weighted, 7=average, 8=average median body)
8. Interpolate in multi time frame mode? (true/false)
(For further clarification, attach the BBstops indy to your chart, and note the settings)
If left blank, filter is ignored
NOTE: An instrument must meet ALL of the (1) InstrumentsToTrade, (2) PSAfilter, and (3) BBstopsTrendFilter criteria, in the same direction (bullish or bearish) for an order (buy or sell) to be placed.
Example, using the default settings: EURUSD currently has a PSA value of +1200 (between +1000 and +999999), and the BBstopsTrendFilter is bullish. Since InstrumentsToTrade includes "EU+", all three filters are bullish, and hence (if other relevant criteria below are also met) Kasparov will be looking for bullish setup candles to place a buy order.
// Entry criteria
// --------------
string FisherPullback = "0,5,0,25,0.7,true";
int FisherLookback = 8;
This determines the pullback required for a valid entry, according to mladen's Nonlag_inverse_Fisher_transform_of_RSX (aka "Fisher" for brevity) indy:
If the Fisher indy was oversold within the last FisherLookback candles (on the timing TF), then a buy order can be generated after an upside breakout on BBstopsEntryTiming.
If the Fisher indy was overbought within the last FisherLookback candles (on the timing TF), then a sell order can be generated after an downside breakout on BBstopsEntryTiming.
If you leave FisherPullback blank, no pullback is required, i.e. the EA will place an order if all other criteria are met.
If non-blank, a pullback is required, and the Fisher indy takes 6 inputs, separated by commas:
1. Time frame (integer: 0=current, 1=M1, 5=M5, 15=M15, 30=M30, 60=H1, 240=H4, 1440=D1, 10080=W1, 43200=monthly)
2. Period (integer)
3. Price (integer: 0=close, 1=open, 2=high, 3=low, 4=median, 5=typical, 6=weighted, 7=average, 8=average median body)
4. NonLag smoothing period (integer)
5. Level (decimal number). The positive value (which you input) is the sell level signal; the negative value is the buy level signal
6. Interpolate in multi time frame mode (true/false)
(For further clarification, attach the Fisher indy to your chart, and note the settings)
See the screenshot and explanation below
string BBstopsEntryTiming = "0,5,0.5,true,0.5,0,0,true";
In Kasparov, mladen's BBstops indy works in conjunction with his Fisher indy to time the entry. When price breaks above/below the line plotted (i.e. the line changes color), a buy/sell order is generated on the close of the candle (on the timing TF) that caused the break.
This setting takes 8 inputs, separated by commas, as follows:
1. Time frame (integer: 0=current, 1=M1, 5=M5, 15=M15, 30=M30, 60=H1, 240=H4, 1440=D1, 10080=W1, 43200=monthly)
2. Bands period (integer)
3. Bands deviation (decimal number)
4. Bands deviation with sample correction? (true/false)
5. Bands risk (decimal number)
6. Bands average type (integer: 0=SMA, 1=EMA, 2=SMMA, 3=LWMA, 4=TEMA)
7. Price (integer: 0=close, 1=open, 2=high, 3=low, 4=median, 5=typical, 6=weighted, 7=average, 8=average median body)
8. Interpolate in multi time frame mode? (true/false)
(For further clarification, attach the BBstops indy to your chart, and note the settings)
See the screenshot and explanation below
**string MaxSetupCandleHeight = "999999";
If the setup candle's height (from low to close for a bullish setup; high to close for bearish) is more than MaxSetupcandleHeight pips, the order will not be placed
**string MinPipsBetweenEntries = "10";
The order will not be placed if an open/pending order already exists for this instrument, with an entry price that is within MinPipsBetweenEntries pips of the contemplated order. (To disable this, set it to 0 or blank).
This applies only if MaxOrdersPerSymbol and MaxOrdersPerCurrency allow multiple orders (pyramiding) in the same instrument (symbol)
**string EntryConfirmationPips = "0";
Input a positive number, to adjust the entry price up/down by EntryConfirmationPips pips for a buy/sell order.
Input a negative number, to adjust the entry price down/up by EntryConfirmationPips pips for a buy/sell order.
To have a market order placed at the close of the setup candle (in reality, the opening tick of the next candle), set this to 0 or blank, i.e. leave the default value
**string MinPipsEntryFromPrice = "5MLS";
This determines the type of order (market/limit/stop) that will be placed:
if the current price is within the specified number of pips of the entry price (after this has been adjusted by EntryConfirmationPips), a MARKET order will be placed at the current price (bid price for sell order; ask price for buy order)
if the current price is outside this range, a LIMIT or STOP order will be placed at the designated price (candle close adjusted by EntryConfirmationPips)
You can also remove the M, L or S from the setting to inhibit market, limit or stop orders (respectively) from being placed
bool AdjustForSpread = true;
If false, the order is placed at the designated entry price
If true, a buy order (and also the SL/TP of a sell order) is further adjusted upward by the current spread, to reflect the ask price
double MaxSpreadPips = 999999;
If the spread currently exceeds MaxSpreadPips pips, the order will not be placed
**string SLmethod = "&0.5E,10,50";
This can be used to set the initial protective stoploss. It consists of up to 4 parameters separated by commas. The first parameter may be one of:
0 = do not use a SL
n = set the SL at the price n, e.g. n could be 1.0525
nE = set the SL n pips away from the entry price, e.g. 10E means 10 pips away from the entry price
&nE = set the SL n ADRs away from the entry price (the default setting of &0.5E is half the daily range)
nC = set the SL n pips outside the previous swing high/low, where the swing is the number of highest high (for a sell) or lowest low (for a buy) within the last m candles (m is the fourth parameter)
blank = if SLmethod is completely blank, a 20 pip SL will be set by default
The second/third parameters (if non-blank) are used to further adjust the SL value to a minimum/maximum number of pips from the entry price. In the default setting, the SL must be no less than 10 pips, and no more than 50 pips.
NOTE: You can also adjust the SL manually (or use the EA's 'Trailing SL' and 'Move to BE' facilities), after the order has been placed
**string TPmethod = "3R";
This can be used to set a profit target (TP). Valid entries are:
0 or blank = do not use a TP
n = set the TP at the price n, e.g. n could be 1.0525
nE = set the TP n pips away from the entry price
&nE = set the TP n ADRs away from the entry price
nR = set the TP n R-multiples away from the entry price. For example, if the SL is 25 pips, then a TP of 3R would set a TP 75 pips away from the entry price
NOTE: You can also adjust the TP manually after the order has been placed
// Order entry operation
// ---------------------
int MagicNumberBuy = 14751;
int MagicNumberSell = 14752;
Magic numbers that will be assigned to buy/sell orders respectively.
The EA uses these to keep track of later exit operations
int NumberOfAttempts = 6;
double SecondsBetweenAttempts = 0.5;
If the br0ker returns an error, the EA will attempt to re-send the order a total of NumberOfAttempts times, with SecondsBetweenAttempts seconds between each attempt. If the order is finally rejected, the EA gives up and waits for the next setup candle for the given instrument
color ArrowColorBuyEntry = Green;
color ArrowColorSellEntry = Red;
Colors for the entry arrows that MT4 places on the chart
string SnapshotFile = "Kasparov screenshots\#kas-";
If non-blank, a screenshot will be generated of the chart, at the time of entry, in the .../MQL4/Files/<your entry> folder/filename.
If left blank, no screenshot will be generated
// Exit criteria
// -------------
string BBstopsExit = "60,10,0.5,false,0.5,0,0,false";
This allows the use of a trailing exit calculated by mladen's BBstops indy.
Input the required parameter settings for the indy, or leave blank to disable this facility.
If non-blank, trailing exit facility is enabled. The setting takes 8 inputs, separated by commas, as follows:
1. Time frame (integer: 0=current, 1=M1, 5=M5, 15=M15, 30=M30, 60=H1, 240=H4, 1440=D1, 10080=W1, 43200=monthly)
2. Bands period (integer)
3. Bands deviation (decimal number)
4. Bands deviation with sample correction? (true/false)
5. Bands risk (decimal number)
6. Bands average type (integer: 0=SMA, 1=EMA, 2=SMMA, 3=LWMA, 4=TEMA)
7. Price (integer: 0=close, 1=open, 2=high, 3=low, 4=median, 5=typical, 6=weighted, 7=average, 8=average median body)
8. Interpolate in multi time frame mode? (true/false)
(For further clarification, attach the BBstops indy to your chart, and note the settings)
See the screenshot and explanation below
// Standard trailing SL (these are standard facilities in all of my EAs)
// --------------------
**string ProfitPipsForSLtoBE = "-1";
The number of pips that the trade must be in profit, for the SL to be moved to breakeven. Leave blank to disable the 'Move SL to BE' facility
double BEpointPips = 0;
Applies to the 'Move SL to BE' facility. The number of pips profit to move the SL to, when the trade is ProfitPipsForSLtoBE pips in profit
**string TrailingSL = "0";
The number of pips behind price to trail the SL. Leave blank to disable the 'Trailing SL' facility
bool TrailOnlyAfterBEreached = true;
If true, the SL will be trailed only after the trade is BEpointPips in profit
If false, the SL will be trailed from the moment the trade is open
// Money management
// ----------------
int MaxOrdersPerSymbol = 1;
This allows you to restrict the number of simultaneously open/pending orders for each instrument (symbol). Setting to a value > 1 allows pyramiding. Only prior orders with a matching magic number are counted
int MaxOrdersPerCurrency = 999999;
This allows you to restrict the number of simultaneously open/pending orders for each currency in the symbol ID. The polarity of the orders (buy or sell) is considered. Only prior orders with a matching magic number are counted.
As an example of how polarity is considered, if there is already one Kasparov-generated SELL order open for GBPJPY, then the count for GBP would be 1 and the count for JPY would be +1. Hence, if MaxOrdersPerCurrency was set to 1, then a new signal to BUY EURGBP (i.e. EUR +1; GBP 1) would effectively cause the count for GBP to reach -2, i.e. two sell orders for GBP, causing the signal to be ignored
string MaxDrawdownAllowed = "0,100%,N";
This allows you to cap drawdown, i.e. cause Kasparov to stop creating new orders after a certain amount of loss has occurred over a specified time period by Kasparov-generated orders. It consists of three entries, separated by a commas.
The first entry is the number of hours over which Kasparov will look backward from the current time, totalling the P/L of any open or closed orders that were opened during this period. Enter 0 to disable this facility. Enter something like 999999 to have Kasparov total the P/L over all orders that were created since its inception, i.e. calculate the EA's total drawdown.
The second entry is the maximum allowed drawdown. Although drawdown is effectively negative, enter a positive number, either with a percent (%) symbol, if you are expressing it as a percentage of account equity, or simply a number, if youre expressing it as a dollar value (or whatever currency your account is denominated in).
For example, suppose you enter 24,300. Then if the P/L of all of your Kasparov-created orders that were opened over the last 24 hours shows a loss of > $300, any signal candles will be ignored until such time as the loss is no longer > $300. This could occur if, for example, losses on open orders decrease, or the 24 hour window has meanwhile shifted so that some (open or closed) trades that were in loss are no longer included in the audit.
The third entry (Y or N) tells the EA whether to additionally close/delete any open/pending Kasparov-generated orders, if/while the specified drawdown exists.
// Miscellaneous
// -------------
int ADRdays = 30;
All of the parameter settings prefixed ** can have their inputs prefixed by an ampersand (&), which means that the numeric part of the input is a number of ADRs rather than a number of pips. Kasparov will automatically multiply this value by the instrument's average daily range over the prior ADRdays days, to convert the value to pips
int PostDiagnosticInfo = 3;
Diagnostic information can be sent to a file named
[EAname]debug.txt
in the .../MQL4/Files folder. Valid entries are:
0 = no diagnostic info will be sent. The file will not be created.
1 = diagnostic info will be sent only upon an error being returned by the broker, to an order processing related operation.
2 = diagnostic info will be sent whenever any order processing operation occurs, whether the outcome successful (accepted by the broker) or not (an error is returned).
3 = diagnostic info is sent at strategic points in the program logic. This is the default and recommended option, as it is almost impossible to troubleshoot the EA without this information.
Explanatory notes
The basic strategy is:
1. Find an instrument with a strong trend on a longer TF. Ideally this trend should have some kind of fundamental/sentiment-based backing, to improve its potential sustainability.
2. On a shorter TF, wait for a significant pullback, and then enter when momentum resumes in the direction of the longer trend.
3. Cut losses quickly. Milk any persistent move for as much profit as it allows.
The screenshot below illustrates these basic principles at work, in the entries and exits:
EURNZD is at the top of the PSA list, i.e. is the most strongly trending pair, hence I've used its chart as an example (however, note that it was unlikely to be strongest when some of the earlier entries occurred -- we are 'cheating' for the sake of this example. Nonetheless, it's possible that, if you had fundamental reasons for believing that EUR was economically strong, and NZD weak, you might have listed it in the InstrumentsToTrade setting). Anyhow......
The dark blue line is generated by BBstopsTrendFilter, and (optionally) confirms the uptrend.
The light blue and tomato colored lines hugging the candles are generated by BBstopsEntryTiming. When the price breaks above the tomato line, turning it blue, we have an entry signal PROVIDING THAT the Fisher indy (in the subwindow) is, or was recently, oversold (blue), denoting a substantial enough pullback. Valid entry setups are marked by the (manually plotted) white vertical lines.
Assuming that the (optional) SL and TP were not hit, exit does not occur until the stepped line, generated by BBstopsExit turning from green to magenta. The first two positions exit at the (manually plotted) red vertical lines; the four subsequent positions remain open as long the BBstopsExit continues to remain green.
The MaxOrdersPerSymbol and MaxOrdersPerCurrency settings allow you to pyramid entries. The SL, TP and Trailing SL options allow a wide variety of exits for individual positions. Or you can simply override everything and manually close them (or adjust their TP levels), if you prefer.
Some final comments.....
Kasparov has a potentially bewildering number of parameter settings. Keep it simple -- stay with the defaults to begin with. Then change settings one by one, to gauge their individual effect. Use the Load/Save buttons in MT4's EA dialog to save and recall your frequently used settings.
You can vary the settings for the BBstops and Fisher indicators in the EA, to allow earlier or later entries, longer or shorter pullback requirements, more tight or lax trailing SL, etc. To see precisely how this will affect the entry and exit signals, make the same changes to the indicators themselves.
If your strategy involves other types of exit, e.g. scaling out, simply disable all of Kasparov's exit settings and use another EA to manage your exits. Kasparov attaches a magic number to every order it creates; your exit EA could operate on any orders with this magic number.
__________________________________________________
DISCLAIMER
1. Enhancements/modifications: Kasparov is written, first and foremost, for my own use. It is shared FREE, on an 'as is', 'take it or leave it' basis. If it doesn't meet your trading requirement, or if you can't get it to behave in the way you expect, please move on. I don't have the time or the knowledge to enhance it so that it meets everybody's trading wish list. At this point I don't intend to write a MT5 version. Sorry, but I won't be sharing the .mq4 source code (reasons here).
2. Troubleshooting: I've done my best to provide a correctly working EA. However, I make no guarantee that the EA is free from errors, or that it will behave as you expect. If the EA appears to be behaving incorrectly:
Make sure that you are running the latest version (download files are below). I am constantly making enhancements and fixes.
There are some complex settings and options. Please read the instructions thoroughly. You should be able to figure out the rest by experimenting in a demo account.
Load the BBstops and Fisher indicators on your charts, to see where the signals occur. Ensure that the indicator's settings are identical to those you're using on the EA.
To avoid potential problems, run only one instance of Kasparov on each MT4 installation, and (if using PSA) only one instance of PSA on its own dedicated chart.
To avoid performance overheads and delays causing possible slippage, keep the number of InstrumentsToTrade (or the range of instruments potentially selectable by PSA) as low as possible.
Beyond this, please feel welcome to report possible bugs and anomalies, but keep in mind that I don't have the time or information needed to answer everybody's questions, or troubleshoot everybody's problems. Especially as I can't reproduce historical scenarios here, and your computer setup and parameter settings will be different to mine.
3. Profitable use: Please don't ask me what settings to use. I'm not a professional trader, I'm a programmer sharing a tool for you to use. If you can consistently find instruments that move far enough, often enough, on any timeframe of your choice, Kasparov SHOULD deliver systematic on-balance profit over time. Note: I don't think it's possible to backtest using MT4's Strategy Tester, due to Kasparov's trading multiple instruments and the fact that no historical data is extractable for PSA.
4. Extent of liability: NEVER run an EA on a real money account, until you're absolutely 100% certain that it behaves exactly the way that you would expect it to, and in any case always trade only with money that you can afford to lose. If you download and run this EA, you do so AT YOUR OWN RISK. I accept NO LIABILITY WHATSOEVER for any monetary losses, or computer-related damage, that you might incur. By downloading and running the EA, you acknowledge that you understand this disclaimer, and that you further agree to abide by the terms and conditions outlined below.
TERMS AND CONDITIONS OF USE
By downloading and using this software, you acknowledge that I give no guarantee as to the accuracy or completeness of the software and the materials, or that they are free from error.
To the fullest extent permitted by law, I expressly disclaim all implied warranties and conditions as to merchantability, fitness or purpose of the software and materials.
You agree to indemnify and hold me harmless and promise to keep me indemnified against any loss, claim, action, settlement, award, judgment, expense or damage of whatsoever kind or nature and howsoever arising that I might suffer as a result of any inaccuracy of the software and/or the materials including any authorized or unauthorized use of the software and/or the materials by you. You further indemnify and hold me harmless for any trading losses, both realized and floating, incurred by you.
16 April: Finished coding just before my MT4 computer broke down. Will resume testing when I get the computer back from the repair shop.
14 April: Hope to complete the coding over the long weekend, and then begin testing when the markets re-open after Easter. Fingers crossed.
9 April 2017: Gotten delayed again. (FX is low priority for me, I have other software that I'm currently updating). Don't know when the EA will be completed.
30 March 2017: Back working on this EA now, I hope to have a beta version available within a couple of weeks.
14 March 2017: Unforeseen events in other business projects have forced me to shelve forex, including this EA, until further notice. Sorry for any inconvenience.
__________________
Can a basic trend following strategy be long term profitable?
Well, just for fun, over the next few days/weeks I'll be writing an EA ('Kasparov EA.ex4') with entries and exits that are based largely around the two little gems posted by mladen here and here. All credit and thanks to mladen.
Comments and questions are welcome, and I'll do my best to reply. However, please read the thread thoroughly before asking questions; they might have already been answered. My time is limited, and I'm not the world's most patient person. Also, I can't afford to have any aggro distracting my own trading: if there are too many unproductive comments from trolls, naysayers, blowhards or freeloaders, I'll discontinue the thread.
I will post the first draft of the Kasparov EA here when it is ready. Please be patient.
And please read the DISCLAIMER and TERMS AND CONDITIONS at the end of this post.
To give you an idea as to how the EA will operate, I've attached a template which I'm using as a starting point (see the 'Explanatory Notes' section below). Feel welcome to trade the system manually while waiting for the EA.
I will flesh out the rest of this post, so that it eventually includes full operating instructions for the EA, as the development proceeds. I'm not seeking suggestions; the settings will allow a lot of operational flexibility, allowing users to configure the EA to suit their requirements. Beyond that, if the EA doesn't meet your trading wish list, please move on.
Overview
Strategy-wise, Kasparov's rationale is to find the strongest trending pairs, either (1) automatically by using a strength meter (PSA), and/or (2) allowing manual override for any other analysis (e.g. fundamental, sentiment, momentum and/or S/R zones on daily chart -- anything you like). There is also an option for a long term trend filter.
IMHO, it's important to understand the strengths and weaknesses behind one's strategy. In this case, it is easy: if the instruments selected trend far enough, frequently enough, the EA will make money. During periods of sideways or indeterminate price movement, it will lose money. Hence success will depend significantly on the user's ability to select instruments with sustainable trends. Because price movement is essentially chaotic, I believe that the indicators used, and their settings, are less important than the broadbrush principles involved. Or put another way, Kasparov is not really a system in itself, rather it is a tool around which you can configure your own trend following system.
Entry timing: entry is made after the Fisher indy highlights a significant pullback on a shorter TF chart (currently I'm using M15), and then the BBstop indy indicates a breakout/resumption of the prevailing trend.
Exits: may be any combo of the following (whichever is triggered first):
(1) use of BBstops as a trailing SL (this is set to a longer TF to allow profits to run, complementing the 'trend following' rationale),
(2) standard move to BE and pip-based trailing SL;
(3) protective SL (options: fixed price; pips; ADRs; swing point+pips);
(4) TP (options: fixed price; pips; R-multiples);
(5) manual adjustment of SL/TP or (partial or full) close.
MM: RiskPerTrade (options: #lots; $$; %equity/balance/free margin; true leverage; ADR$); Max simultaneous orders per symbol; max simultaneous orders per currency; max drawdown allowed (no more entries if %equity or $$ lost in last X hours).
Operational Notes
The Kasparov EA must be attached to only ONE price chart. No matter what the chart's instrument/symbol is, it will place orders on the instruments that you specify, checking the entry criteria for each instrument at the close of the candle of the chart on which it is attached (the 'setup' or 'trigger' candle). If all required criteria are met, an order will be placed on the opening tick of the next candle. Kasparov will also manage orders for any instrument where the order's magic number matches the magic number(s) that you've set in the EA parameters, on every new price tick.
If you are using the PSAfilter, the PSA indicator must be attached to its own dedicated chart.
EA Parameters (a work in progress, I will flesh these out further over the coming days):
// Global settings
//----------------
string EAname = "Kas-";
Gets pasted into the Comment field for each order generated by the EA
Note: the EA also populates the Comment field with the:
instrument symbol, e.g. USDJPY;
risk per trade entry, e.g. 1%E;
magic# inside square brackets, e.g. [14751];
the instrument's PSA value, if PSA filtering is being used, inside curly braces, e.g. {-562.00}
// Instruments to trade, direction and size
// ----------------------------------------
string RiskPerTrade = "1%E";
Input must be one of the following:
# = number of lots
$ = dollar amount to risk
%E = % equity to place at risk*
%B = % balance to place at risk*
%F = % free margin to place at risk*
: = %risk per 100 pips
& = %risk per ADR pips
[* these require an initial SL to be set (see SLmethod parameter)]
Martingale option: increase/decrease position risk however you wish, by separating up to 20 entries (martingale steps) by commas. The EA determines the step number by counting recent consecutive losses from closed orders that were initiated by Kasparov, across all instruments traded; after all steps have been exhausted, or a winning trade occurs, they start over from the beginning, e.g. to double up to a max of six steps, use something like: 1%E, 2%E, 4%E, 8%E, 16%E, 32%E
string InstrumentsToTrade = "EU+1,EJ+2";
List of which instruments to trade. Up to 50 items, separated by commas.
Acceptable shorthand: A=AUD, C=CAD, E=EUR, F=CHF, G=GBP, J=JPY, N=NZD, U=USD, *=all 28 currency pairs; other symbol IDs (exotics, metals, indices, etc) must be typed in full
+ = place buy orders only for this instrument
- = place sell orders only for this instrument
neither + nor - = may place either a buy or a sell order (depending on other criteria being met)
To have neither buy nor sell orders placed, simply omit the instrument from the list
Numeric value is a multiplier for RiskPerTrade, e.g. the above example would risk 1%E for EURUSD and 2%E for EURJPY; if omitted, defaults to 1
NOTE: the Kasparov EA is ambitious, in the sense that it attempts to both open and close orders from multiple instruments/pairs, while running off just one chart. It is strongly recommended that you limit the number of InstrumentsToTrade to just a few currency pairs. Specifying a large number of instruments will likely cause MT4 to run very slowly, delaying the placement of orders and hence possibly causing additional slippage.
string AllPairsScratchpad = " GU,UF,EU,UJ,UC,NU,AU,AN,AC,AF,AJ,CJ,FJ,EG,EA,EF,EJ,EN,EC,GF,GA,GC,GJ,GN,NJ,NC,CF,NF";
List of 28 major currency pairs. This setting is ignored by the EA, it is there to allow you to easily copy/paste it into InstrumentsToTrade (or set it to any text you wish)
string PSAfilter = "Kas1,1000,999999";
Default setting means that buy orders will be placed for instruments with PSA values between +1000 and +999999; sell orders for instruments with PSA values between -1000 and -999999; and no orders will be placed for instruments with PSA values between -1000 and +1000
If parameter is left blank, there is no restriction, i.e. instruments listed in InstrumentsToTrade that meet all other criteria will be traded
The first parameter is the link from the relevant PSA indicator's Unique ID setting, allowing the EA to know which PSA's displayed values to use in its calculations (because you might have multiple PSA indicators, on different charts)
[NOTE: You can use your own strength meter instead of PSA, provided that you amend it to update Global Variables named @PSA-xxx-symbol-01 with the strength value, where xxx matches the first entry in the PSAfilter, and symbol is the instrument ID (e.g. EURUSD). If the strength value currently lies between the second and third entries of PSAfilter, Kasparov will place orders for this instrument (if all other criteria are met)].
string BBstopsTrendFilter = "240,10,0.5,false,0.5,0,0,false";
If non-blank, mladen's BBstops indy will be used as trend filter, i.e. instrument will be traded only in the same direction as the filter.
It takes 8 inputs, separated by commas, as follows:
1. Time frame (integer: 0=current, 1=M1, 5=M5, 15=M15, 30=M30, 60=H1, 240=H4, 1440=D1, 10080=W1, 43200=monthly)
2. Bands period (integer)
3. Bands deviation (decimal number)
4. Bands deviation with sample correction? (true/false)
5. Bands risk (decimal number)
6. Bands average type (integer: 0=SMA, 1=EMA, 2=SMMA, 3=LWMA, 4=TEMA)
7. Price (integer: 0=close, 1=open, 2=high, 3=low, 4=median, 5=typical, 6=weighted, 7=average, 8=average median body)
8. Interpolate in multi time frame mode? (true/false)
(For further clarification, attach the BBstops indy to your chart, and note the settings)
If left blank, filter is ignored
NOTE: An instrument must meet ALL of the (1) InstrumentsToTrade, (2) PSAfilter, and (3) BBstopsTrendFilter criteria, in the same direction (bullish or bearish) for an order (buy or sell) to be placed.
Example, using the default settings: EURUSD currently has a PSA value of +1200 (between +1000 and +999999), and the BBstopsTrendFilter is bullish. Since InstrumentsToTrade includes "EU+", all three filters are bullish, and hence (if other relevant criteria below are also met) Kasparov will be looking for bullish setup candles to place a buy order.
// Entry criteria
// --------------
string FisherPullback = "0,5,0,25,0.7,true";
int FisherLookback = 8;
This determines the pullback required for a valid entry, according to mladen's Nonlag_inverse_Fisher_transform_of_RSX (aka "Fisher" for brevity) indy:
If the Fisher indy was oversold within the last FisherLookback candles (on the timing TF), then a buy order can be generated after an upside breakout on BBstopsEntryTiming.
If the Fisher indy was overbought within the last FisherLookback candles (on the timing TF), then a sell order can be generated after an downside breakout on BBstopsEntryTiming.
If you leave FisherPullback blank, no pullback is required, i.e. the EA will place an order if all other criteria are met.
If non-blank, a pullback is required, and the Fisher indy takes 6 inputs, separated by commas:
1. Time frame (integer: 0=current, 1=M1, 5=M5, 15=M15, 30=M30, 60=H1, 240=H4, 1440=D1, 10080=W1, 43200=monthly)
2. Period (integer)
3. Price (integer: 0=close, 1=open, 2=high, 3=low, 4=median, 5=typical, 6=weighted, 7=average, 8=average median body)
4. NonLag smoothing period (integer)
5. Level (decimal number). The positive value (which you input) is the sell level signal; the negative value is the buy level signal
6. Interpolate in multi time frame mode (true/false)
(For further clarification, attach the Fisher indy to your chart, and note the settings)
See the screenshot and explanation below
string BBstopsEntryTiming = "0,5,0.5,true,0.5,0,0,true";
In Kasparov, mladen's BBstops indy works in conjunction with his Fisher indy to time the entry. When price breaks above/below the line plotted (i.e. the line changes color), a buy/sell order is generated on the close of the candle (on the timing TF) that caused the break.
This setting takes 8 inputs, separated by commas, as follows:
1. Time frame (integer: 0=current, 1=M1, 5=M5, 15=M15, 30=M30, 60=H1, 240=H4, 1440=D1, 10080=W1, 43200=monthly)
2. Bands period (integer)
3. Bands deviation (decimal number)
4. Bands deviation with sample correction? (true/false)
5. Bands risk (decimal number)
6. Bands average type (integer: 0=SMA, 1=EMA, 2=SMMA, 3=LWMA, 4=TEMA)
7. Price (integer: 0=close, 1=open, 2=high, 3=low, 4=median, 5=typical, 6=weighted, 7=average, 8=average median body)
8. Interpolate in multi time frame mode? (true/false)
(For further clarification, attach the BBstops indy to your chart, and note the settings)
See the screenshot and explanation below
**string MaxSetupCandleHeight = "999999";
If the setup candle's height (from low to close for a bullish setup; high to close for bearish) is more than MaxSetupcandleHeight pips, the order will not be placed
**string MinPipsBetweenEntries = "10";
The order will not be placed if an open/pending order already exists for this instrument, with an entry price that is within MinPipsBetweenEntries pips of the contemplated order. (To disable this, set it to 0 or blank).
This applies only if MaxOrdersPerSymbol and MaxOrdersPerCurrency allow multiple orders (pyramiding) in the same instrument (symbol)
**string EntryConfirmationPips = "0";
Input a positive number, to adjust the entry price up/down by EntryConfirmationPips pips for a buy/sell order.
Input a negative number, to adjust the entry price down/up by EntryConfirmationPips pips for a buy/sell order.
To have a market order placed at the close of the setup candle (in reality, the opening tick of the next candle), set this to 0 or blank, i.e. leave the default value
**string MinPipsEntryFromPrice = "5MLS";
This determines the type of order (market/limit/stop) that will be placed:
if the current price is within the specified number of pips of the entry price (after this has been adjusted by EntryConfirmationPips), a MARKET order will be placed at the current price (bid price for sell order; ask price for buy order)
if the current price is outside this range, a LIMIT or STOP order will be placed at the designated price (candle close adjusted by EntryConfirmationPips)
You can also remove the M, L or S from the setting to inhibit market, limit or stop orders (respectively) from being placed
bool AdjustForSpread = true;
If false, the order is placed at the designated entry price
If true, a buy order (and also the SL/TP of a sell order) is further adjusted upward by the current spread, to reflect the ask price
double MaxSpreadPips = 999999;
If the spread currently exceeds MaxSpreadPips pips, the order will not be placed
**string SLmethod = "&0.5E,10,50";
This can be used to set the initial protective stoploss. It consists of up to 4 parameters separated by commas. The first parameter may be one of:
0 = do not use a SL
n = set the SL at the price n, e.g. n could be 1.0525
nE = set the SL n pips away from the entry price, e.g. 10E means 10 pips away from the entry price
&nE = set the SL n ADRs away from the entry price (the default setting of &0.5E is half the daily range)
nC = set the SL n pips outside the previous swing high/low, where the swing is the number of highest high (for a sell) or lowest low (for a buy) within the last m candles (m is the fourth parameter)
blank = if SLmethod is completely blank, a 20 pip SL will be set by default
The second/third parameters (if non-blank) are used to further adjust the SL value to a minimum/maximum number of pips from the entry price. In the default setting, the SL must be no less than 10 pips, and no more than 50 pips.
NOTE: You can also adjust the SL manually (or use the EA's 'Trailing SL' and 'Move to BE' facilities), after the order has been placed
**string TPmethod = "3R";
This can be used to set a profit target (TP). Valid entries are:
0 or blank = do not use a TP
n = set the TP at the price n, e.g. n could be 1.0525
nE = set the TP n pips away from the entry price
&nE = set the TP n ADRs away from the entry price
nR = set the TP n R-multiples away from the entry price. For example, if the SL is 25 pips, then a TP of 3R would set a TP 75 pips away from the entry price
NOTE: You can also adjust the TP manually after the order has been placed
// Order entry operation
// ---------------------
int MagicNumberBuy = 14751;
int MagicNumberSell = 14752;
Magic numbers that will be assigned to buy/sell orders respectively.
The EA uses these to keep track of later exit operations
int NumberOfAttempts = 6;
double SecondsBetweenAttempts = 0.5;
If the br0ker returns an error, the EA will attempt to re-send the order a total of NumberOfAttempts times, with SecondsBetweenAttempts seconds between each attempt. If the order is finally rejected, the EA gives up and waits for the next setup candle for the given instrument
color ArrowColorBuyEntry = Green;
color ArrowColorSellEntry = Red;
Colors for the entry arrows that MT4 places on the chart
string SnapshotFile = "Kasparov screenshots\#kas-";
If non-blank, a screenshot will be generated of the chart, at the time of entry, in the .../MQL4/Files/<your entry> folder/filename.
If left blank, no screenshot will be generated
// Exit criteria
// -------------
string BBstopsExit = "60,10,0.5,false,0.5,0,0,false";
This allows the use of a trailing exit calculated by mladen's BBstops indy.
Input the required parameter settings for the indy, or leave blank to disable this facility.
If non-blank, trailing exit facility is enabled. The setting takes 8 inputs, separated by commas, as follows:
1. Time frame (integer: 0=current, 1=M1, 5=M5, 15=M15, 30=M30, 60=H1, 240=H4, 1440=D1, 10080=W1, 43200=monthly)
2. Bands period (integer)
3. Bands deviation (decimal number)
4. Bands deviation with sample correction? (true/false)
5. Bands risk (decimal number)
6. Bands average type (integer: 0=SMA, 1=EMA, 2=SMMA, 3=LWMA, 4=TEMA)
7. Price (integer: 0=close, 1=open, 2=high, 3=low, 4=median, 5=typical, 6=weighted, 7=average, 8=average median body)
8. Interpolate in multi time frame mode? (true/false)
(For further clarification, attach the BBstops indy to your chart, and note the settings)
See the screenshot and explanation below
// Standard trailing SL (these are standard facilities in all of my EAs)
// --------------------
**string ProfitPipsForSLtoBE = "-1";
The number of pips that the trade must be in profit, for the SL to be moved to breakeven. Leave blank to disable the 'Move SL to BE' facility
double BEpointPips = 0;
Applies to the 'Move SL to BE' facility. The number of pips profit to move the SL to, when the trade is ProfitPipsForSLtoBE pips in profit
**string TrailingSL = "0";
The number of pips behind price to trail the SL. Leave blank to disable the 'Trailing SL' facility
bool TrailOnlyAfterBEreached = true;
If true, the SL will be trailed only after the trade is BEpointPips in profit
If false, the SL will be trailed from the moment the trade is open
// Money management
// ----------------
int MaxOrdersPerSymbol = 1;
This allows you to restrict the number of simultaneously open/pending orders for each instrument (symbol). Setting to a value > 1 allows pyramiding. Only prior orders with a matching magic number are counted
int MaxOrdersPerCurrency = 999999;
This allows you to restrict the number of simultaneously open/pending orders for each currency in the symbol ID. The polarity of the orders (buy or sell) is considered. Only prior orders with a matching magic number are counted.
As an example of how polarity is considered, if there is already one Kasparov-generated SELL order open for GBPJPY, then the count for GBP would be 1 and the count for JPY would be +1. Hence, if MaxOrdersPerCurrency was set to 1, then a new signal to BUY EURGBP (i.e. EUR +1; GBP 1) would effectively cause the count for GBP to reach -2, i.e. two sell orders for GBP, causing the signal to be ignored
string MaxDrawdownAllowed = "0,100%,N";
This allows you to cap drawdown, i.e. cause Kasparov to stop creating new orders after a certain amount of loss has occurred over a specified time period by Kasparov-generated orders. It consists of three entries, separated by a commas.
The first entry is the number of hours over which Kasparov will look backward from the current time, totalling the P/L of any open or closed orders that were opened during this period. Enter 0 to disable this facility. Enter something like 999999 to have Kasparov total the P/L over all orders that were created since its inception, i.e. calculate the EA's total drawdown.
The second entry is the maximum allowed drawdown. Although drawdown is effectively negative, enter a positive number, either with a percent (%) symbol, if you are expressing it as a percentage of account equity, or simply a number, if youre expressing it as a dollar value (or whatever currency your account is denominated in).
For example, suppose you enter 24,300. Then if the P/L of all of your Kasparov-created orders that were opened over the last 24 hours shows a loss of > $300, any signal candles will be ignored until such time as the loss is no longer > $300. This could occur if, for example, losses on open orders decrease, or the 24 hour window has meanwhile shifted so that some (open or closed) trades that were in loss are no longer included in the audit.
The third entry (Y or N) tells the EA whether to additionally close/delete any open/pending Kasparov-generated orders, if/while the specified drawdown exists.
// Miscellaneous
// -------------
int ADRdays = 30;
All of the parameter settings prefixed ** can have their inputs prefixed by an ampersand (&), which means that the numeric part of the input is a number of ADRs rather than a number of pips. Kasparov will automatically multiply this value by the instrument's average daily range over the prior ADRdays days, to convert the value to pips
int PostDiagnosticInfo = 3;
Diagnostic information can be sent to a file named
[EAname]debug.txt
in the .../MQL4/Files folder. Valid entries are:
0 = no diagnostic info will be sent. The file will not be created.
1 = diagnostic info will be sent only upon an error being returned by the broker, to an order processing related operation.
2 = diagnostic info will be sent whenever any order processing operation occurs, whether the outcome successful (accepted by the broker) or not (an error is returned).
3 = diagnostic info is sent at strategic points in the program logic. This is the default and recommended option, as it is almost impossible to troubleshoot the EA without this information.
Explanatory notes
The basic strategy is:
1. Find an instrument with a strong trend on a longer TF. Ideally this trend should have some kind of fundamental/sentiment-based backing, to improve its potential sustainability.
2. On a shorter TF, wait for a significant pullback, and then enter when momentum resumes in the direction of the longer trend.
3. Cut losses quickly. Milk any persistent move for as much profit as it allows.
The screenshot below illustrates these basic principles at work, in the entries and exits:
EURNZD is at the top of the PSA list, i.e. is the most strongly trending pair, hence I've used its chart as an example (however, note that it was unlikely to be strongest when some of the earlier entries occurred -- we are 'cheating' for the sake of this example. Nonetheless, it's possible that, if you had fundamental reasons for believing that EUR was economically strong, and NZD weak, you might have listed it in the InstrumentsToTrade setting). Anyhow......
The dark blue line is generated by BBstopsTrendFilter, and (optionally) confirms the uptrend.
The light blue and tomato colored lines hugging the candles are generated by BBstopsEntryTiming. When the price breaks above the tomato line, turning it blue, we have an entry signal PROVIDING THAT the Fisher indy (in the subwindow) is, or was recently, oversold (blue), denoting a substantial enough pullback. Valid entry setups are marked by the (manually plotted) white vertical lines.
Assuming that the (optional) SL and TP were not hit, exit does not occur until the stepped line, generated by BBstopsExit turning from green to magenta. The first two positions exit at the (manually plotted) red vertical lines; the four subsequent positions remain open as long the BBstopsExit continues to remain green.
The MaxOrdersPerSymbol and MaxOrdersPerCurrency settings allow you to pyramid entries. The SL, TP and Trailing SL options allow a wide variety of exits for individual positions. Or you can simply override everything and manually close them (or adjust their TP levels), if you prefer.
Some final comments.....
Kasparov has a potentially bewildering number of parameter settings. Keep it simple -- stay with the defaults to begin with. Then change settings one by one, to gauge their individual effect. Use the Load/Save buttons in MT4's EA dialog to save and recall your frequently used settings.
You can vary the settings for the BBstops and Fisher indicators in the EA, to allow earlier or later entries, longer or shorter pullback requirements, more tight or lax trailing SL, etc. To see precisely how this will affect the entry and exit signals, make the same changes to the indicators themselves.
If your strategy involves other types of exit, e.g. scaling out, simply disable all of Kasparov's exit settings and use another EA to manage your exits. Kasparov attaches a magic number to every order it creates; your exit EA could operate on any orders with this magic number.
__________________________________________________
DISCLAIMER
1. Enhancements/modifications: Kasparov is written, first and foremost, for my own use. It is shared FREE, on an 'as is', 'take it or leave it' basis. If it doesn't meet your trading requirement, or if you can't get it to behave in the way you expect, please move on. I don't have the time or the knowledge to enhance it so that it meets everybody's trading wish list. At this point I don't intend to write a MT5 version. Sorry, but I won't be sharing the .mq4 source code (reasons here).
2. Troubleshooting: I've done my best to provide a correctly working EA. However, I make no guarantee that the EA is free from errors, or that it will behave as you expect. If the EA appears to be behaving incorrectly:
Make sure that you are running the latest version (download files are below). I am constantly making enhancements and fixes.
There are some complex settings and options. Please read the instructions thoroughly. You should be able to figure out the rest by experimenting in a demo account.
Load the BBstops and Fisher indicators on your charts, to see where the signals occur. Ensure that the indicator's settings are identical to those you're using on the EA.
To avoid potential problems, run only one instance of Kasparov on each MT4 installation, and (if using PSA) only one instance of PSA on its own dedicated chart.
To avoid performance overheads and delays causing possible slippage, keep the number of InstrumentsToTrade (or the range of instruments potentially selectable by PSA) as low as possible.
Beyond this, please feel welcome to report possible bugs and anomalies, but keep in mind that I don't have the time or information needed to answer everybody's questions, or troubleshoot everybody's problems. Especially as I can't reproduce historical scenarios here, and your computer setup and parameter settings will be different to mine.
3. Profitable use: Please don't ask me what settings to use. I'm not a professional trader, I'm a programmer sharing a tool for you to use. If you can consistently find instruments that move far enough, often enough, on any timeframe of your choice, Kasparov SHOULD deliver systematic on-balance profit over time. Note: I don't think it's possible to backtest using MT4's Strategy Tester, due to Kasparov's trading multiple instruments and the fact that no historical data is extractable for PSA.
4. Extent of liability: NEVER run an EA on a real money account, until you're absolutely 100% certain that it behaves exactly the way that you would expect it to, and in any case always trade only with money that you can afford to lose. If you download and run this EA, you do so AT YOUR OWN RISK. I accept NO LIABILITY WHATSOEVER for any monetary losses, or computer-related damage, that you might incur. By downloading and running the EA, you acknowledge that you understand this disclaimer, and that you further agree to abide by the terms and conditions outlined below.
TERMS AND CONDITIONS OF USE
By downloading and using this software, you acknowledge that I give no guarantee as to the accuracy or completeness of the software and the materials, or that they are free from error.
To the fullest extent permitted by law, I expressly disclaim all implied warranties and conditions as to merchantability, fitness or purpose of the software and materials.
You agree to indemnify and hold me harmless and promise to keep me indemnified against any loss, claim, action, settlement, award, judgment, expense or damage of whatsoever kind or nature and howsoever arising that I might suffer as a result of any inaccuracy of the software and/or the materials including any authorized or unauthorized use of the software and/or the materials by you. You further indemnify and hold me harmless for any trading losses, both realized and floating, incurred by you.
Attached File(s)
Kasparov.zip
2.5 MB
|
4,308 downloads