You are not an MT4talk member yet! You cannot download files.
Log in or register a FREE account!
If you have good ideas, please, write them here. I will implement them in code for free and will share results here.
Real-Time Forex Robot Tests!
My EA trades "one cycle at a time".
Each cycle lasts one Bar. For example, a one hour eur/usd Bar.
Then a new cycle will start, lasting one Bar. (Usually I keep the time frame constant, but the currency pair might vary.)
So, let's say that we are ready to start a new cycle in Bar of a 1 hr eur/usd.
So, we start the cycle...
First, we make sure that there are no open orders at Open.
Then, at Open, the currently achieved "highest high price" for Bar is the Open; and the currently achieved "lowest low price" for Bar is the Open.
Cycles can use a "half channel" method, or a "full channel" method.
With either variant method, only a single order will be active at a time.
For now, we'll walk through the "half channel" method.
We put a "half a channel" width "threshold trigger line" above the highest high price, achieved so far in Bar.
We also put a "half a channel" width "threshold trigger line" below the lowest low price, achieved so far in Bar.
-------------------------------- Buy Trigger
Sell trigger (same distance)
As time passes, one of these trigger lines will be broken/pierced.
For now, assume that the upper trigger line was broken through.
Thinking that this (micro) trend might hold, we send out a Buy order with a TP and a SL.
Whichever way the Buy order exits the market, a "half channel width away" threshold trigger line will be placed above the current (new) highest high price achieved in this Bar.
And a new Buy order will go out only if this new threshold is passed.
The Forex educational web site "baby pips" recommends that for scalpers, the SL to TP ratio should be 0.7 to 1.
... Since (on the average) prices are as likely to rise as to fall, the SL to TP ratio tries to produce a small gain, on the accumulated trades.
The SL and the TP might be both a fixed number of pips, but I favor TP = (momentary_spread times a_TP_constant) and
SL= (momentary_spread times an_SL_constant).
(Meanwhile, as a technicality: ENC brokers do not allow TP and SL to be set as the OrderSend command goes out in mql4. So an OrderModify command establishes the TP and SL subsequently.)
And via (OrderModify), one can [in the abstract] get Trailing Stops to lock in gains already produced.
And (further), OrderModify-s can advance the TP also, more far away from the original SL.
Should one continually advance the TP, likely one will exit with a trailing SL.
But, the continuous "one more spread, one more spread, one more spread" will not be charged to the EA as it follows a (micro) trend;
[versus entering a trade and exiting with a fixed TP, entering a new trade and exiting with a fixed TP, entering a new trade and exiting with a fixed TP, as a (micro) trend continues].
Trades in the Sell direction essentially mirror the procedure for the Buy.
A "half channel width away" trigger threshold line below the currently achieved lowest low price will determine when
a Sell order will be produced.
Again, regardless of how the Sell order fares, a " half channel witdh away" threshold trigger below the current lowest low price will determine when the next Sell order will be produced.
(The TP, SL and Trailing Stop strategy will be as for the Buy, but in the down direction.)
**Things to note:**
The highest high achieved price ultimately becomes the High of Bar, while the achieved lowest low price eventually becomes the Low of Bar.
With the half channel method, the two threshold trigger lines will recede from each other (and the Open) during the time allotted to the Bar.
If a Day time frame Bar was used instead of a 1 hour time frame, the market might rise for some hours, and then start to fall. (And the "Sell trigger" for the Day time frame would not be activated for quite a while [with the half channel method], waiting for prices to recede.)
So, using a one hour time frame for the eur/usd (vs a time frame of a Day), prices could rise for a few hours. But as prices begin to fall, the one hour time frame re positions the Sell threshold repeatedly; in our example, away from the (still far away) Open of the Day. Making a one hour time frame "better" than a one Day time frame [when the half channel method is used], to react to price changes.
Two more things for now:
1, The EA should not send new orders out close to the "expiration time" of Bar with the half channel method.
(This, since there might not be enough time still left for the prices to move a spread toward the TP, while the Bar is still active as Bar instead of having become Bar.
And since the next active Bar will close any open orders, the EA would "lose a spread" on the very last order, if the trade order was close to Bar-s expiration time.)
2, The "top and bottom threshold triggers receding from each other" with the half channel method can try to be alleviated with the "full channel" (micro Stop and Reverse) method.
With the full channel method, the eur/usd one hour time frame proceeds as follows:
At the Open of the Bar, close any outstanding orders.
Put a "half channel width" trigger threshold line above and below the Open of the Bar.
Again, one of the trigger lines will be pierced by the changing prices.
For illustration's sake, assume that the Buy line was broken by rising prices.
So, a Buy order goes out, with a TP, SL (and maybe a Trailing Stop eventually).
But now, after the first order of this Bar's cycle exits (with a loss or a gain): a half channel trigger threshold is placed above AND below the OrderClosePrice.
Prices will again rise or fall, and one of the triggers will be activated and depending on which threshold was pierced, a Buy or Sell ticket will try to be produced.
Regardless of a gain or loss on the ticket, a half channel width threshold trigger line will be placed above and below the OrderClosePrice.
Again, one of the triggers will be activated, and a new order will go out: Buy or Sell.
And again, the half channel triggers will be placed above and below the OrderClosePrice, regardless of the ticket's gain or loss.
This process is repeated until the cycle finished in the Bar's allotted time (except for the last few seconds, when there is not enough time left for the prices to travel a spread toward the TP, so no new order can be issued as the Close is imminent).
Testing the half channel and the full channel ideas for (at least) a 100 trades each is laborious, manually.
But the Meta Trader's Strategy Tester can do this for a week's worth of data, effortlessly.
(Once the EA is coded.)
With the half channel method, a "filter" was in place [higher high or lower low], that sort of established an "artificial trend".
With the full channel method, the (unfiltered) micro trends themselves are supposed to generate more gains than losses.
**Three more things:**
1, the "anti Martingale"/"external Stop Loss" method
2, the multi currency filter
3, "position sizing".
The EA keeps track of the highest account balance and equity achieved after any deposit or withdrawal.
Should the draw down (equity or balance) be lower by xx% from these values, the EA stops trading and sends/produces Alerts.
The EA-s owner can wait (a day?) or activate a "cent account" to see how the EA would react to the problematic market.
The owner of the EA might restart the (stopped) EA at some level of funding and after some time delay...
Multi currency filter:
On just about any time frame below a Day and any currency pair, the chart will show small, medium and large size Bars.
And, small Bars usually occur "many at a time".
And the half channel (and hopefully) the full channel method (potentially) profit more from larger Bars, than from small Bars (a relatively flat market).
The "diversified multi channel filter" tries to avoid entering (projected/future) small Bars.
So: Look at Bar of ten different currency pairs, as the time for the Open of Bar arrives.
If a full lot was (hypothetically) bought at the Low of each of these Bars and sold at the Bar's High, (likely) all of the monitored currency pairs would have made different amount of $$.
So, select the top four pairs that made the most money via this "Bar maximum possible gain" test.
It is very likely that for these four pairs, ihe coming Bar will not be a small bar.
So, for the next cycle that will last the duration of the new Bar, trade these all of these four (diversified) currencies simultaneously. (Half channel or full channel methods.)
...Have the EA give each of the four currencies 1/4 as much $$ as the single currency got per trade, when the EA only traded one pair at a time.
When one says: "Have the EA give each of the four chosen currency pairs 1/4 as much $$ as when only a single currency pair was traded on a single Bar and cycle", the EA has to produce actual numbers for the various OrderSend commands per currency pairs traded.
(Incidentally: the "common wisdom" in America is that the sum of the total orders in the market should be about two percent of the AccountBalance for a new system. Later, this percentage might be increased.)
An example of how to calculate lot sizes for various currency pairs follow.
http://learningcenter.fxstreet.com/educ … tion-size/
(The half channel triggers are a bit like a "not yet overbought" and "not yet oversold" signals.)
The full channel threshold triggers surround the price and hopefully anticipate micro trends.
The multi-currency selection process should increase the EA's yield, by avoiding flat markets.
admin, Afnan Al-mustafa, Amadon, Bushra mahamed, dalvinfx, Elite12345, femo, Hassan Mohamed, Joowsiqueira, Joseph Raphael L. Betito, kimedtut, msg100, Percval0, rostaus, SantiagoRodney, sbabu, T33 Siko, walidshahbudin, Wan Zamzuari Wan Mukhtar, win520923, yunmr2000, يا مسهل الحال
MT4talk is a User Generated Content website. All content uploaded to MT4talk by our users (MT4talk forum members) is User Generated Content. Please note that MT4talk doesn't sell Forex robots and does not provide support for the uploaded Forex robots. MT4talk only sells PRO membership. PRO membership is unlimited download access in every forum topic and forum posts.
CFTC RULE 4.41 – HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY. SIMULATED TRADING PROGRAMS, IN GENERAL, ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.
Disclaimer - No representation is being made that any Forex account will or is likely to achieve profits or losses similar to those shown on backtests in this forum. In fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program. Hypothetical trading does not involve financial risk, and no hypothetical trading record can completely account for the impact of financial risk in actual trading. All information on this forum is for educational purposes only and is not intended to provide financial advice. Any statements posted by forum members or the MT4talk EA Tester Team about profits or income expressed or implied, do not represent a guarantee. Your actual trading may result in losses as no trading system is guaranteed. You accept full responsibilities for your actions, trades, profit or loss, and agree to hold the MT4talk team and forum members of this information harmless in any and all ways.
Affiliates Disclaimer - The site may contain links to affiliate websites, and we receive an affiliate commission for any sign up that trade by you on the affiliate website using such links. Our affiliate partners includes the following: FXOpen, FBS, LQDFX, MyForexVPS.