Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
I recommend using SciTE text editor. It works on windows, linux, etc. If you turn on "C" style syntax highlighting you get many features like syntax checking. It has code collapsing so you can shrink functions, tabs so you can compare multiple files, if you move cursor near a } it shows the matching {, very advanced find/replace options etc. It doesn't have the lookup tools that you get using MetaEditor of course, but you don't need those at all if you are just reading text. I tend to use SciTE when I develop Python and PHP, but I have specialized IDE for C/C++. The more familiar you are with MQL functions, the more reason to use SciTE over MetaEditor for development. For code review I always recommend SciTE. I am working on a code cleanup/optimization project now, and I think SciTE saved me several hours of checking curly braces, etc. Only feature I want out of Visual Studio that isn't present in SciTE is auto re-indent (find a blob of unintended code and auto indent every line). http://www.scintilla.org for download (free software). If anyone else knows of a free lightweight text editor with auto-reindent and code collapsing, please let me know
For matching code with code to replace, I recommend find. For printing out line numbers on several pages of code, I have no idea except possibly in whatever program you use to print. I think SciTE can do that but I'm allergic to printing. Actually I need a new ink cartridge but that's more personal.
Short Version: Try MaxTrades=3 signal_count = 10 and variations of similar settings.
Long Version: I'm glad people are very interested in this. To perform a very similar test you can also set MaxTrades = 2 or more. That way if you are in a buy trade and you get a sell signal, you enter the second position. It is highly recommended to have signal_count set to ?? value so you don't enter the same signal each tick up to the maximum value. (see "Weekly build notes" in this thread) It may be better to use "confirming signals per bar" instead of "confirming signals per tick" when combined with MaxTrades. Please see the links in this thread, the code change to do this is moving one line of code 4 or 5 lines higher.
There can be no signal for entering second position after Phoenix opened first position. That is why I propose to enter second position not by signal, but by distance from the entering point of the first Phoenix position. This second enter should be made between Phoenix SL point and Phoenix Enter point. The closer to SL, the less will be Stoploss of second position, the greater will Takeprofit (distance from entering second position and Breakeven point of first Phoenix position). Simply by having good gain\profit ration we'll get profit.
The only thing is that what is the probability if the price goes -40pips, then returns to breakeven (and goes to Phoenix TP). It is very timeconsuming to test it manually, so it would be great if somenody could add to code of Phoenix several options:
- to enter second ''not Phoenix'' trade when prices goes to -X pips
- SL of that second trade is the same as Phoenix position one
- Take profit - variable (usually - entering price of Phoenix position)
- ability to decrease number of that second trades (as ptice can fluctuates a lot, and btw we can get 2 or 3 trades while holding Phoenix position)
On the whole, this idea is based not on signals, but on statistics, that Phoenix makes a lot of correct entries, which overcome bad entries. Plus, goog gain\loss ratio.
This is thread for development, code submissions, different EA builds and ideas for development. I request that the first 3 posts are held by people willing to actively work on this, and then people can post their ideas and suggestions.
The first 3 posts will be actively edited when new information is released so new people always read the most current official information on the first post.
I personally like the idea of 3 builds: Stable - okay to run all modes with real money, verified profitable on at least 2 weeks of live testing and no reported killer bugs. An "ultra stable" version should also be released. Older stable versions will be released. Testing - live testing performed on mostly stable builds to be candidates for "stable" build. Live testing verifies profitability and consistency. weekly or nightly build - all code submissions combined together so people can backtest the latest features.
Current Stable: None. Maybe Phoenix 5.6.3 with modes 2/3 completely blocked from trading.
Current Testing: Phoenix 5.6.3 Mode 1/Mode 2
Weekly build: Phoenix 5.6.4
Weekly build notes: HerbertH Mode3 fix (SL updated on 2 and 3 when 1 TP), Dagnar@FF Consecutive Signals (Ignore Buy/Sell signals less than threshhold, setting of 5 had excellent results), and Daraknor "MaxTrades" option added for mode 1(untested). Details are post #10.
Guys, I suggest you add time and date of last modification as a comment line into the ea. Would be really helpful and well, the more precise the less confusion. Just my 2 cents.
Cheers,
Diam0nd
I LOVE
__________________
- MetaTrader v4.00 Build 225 (10 Jul 2008)
- MetaTrader MultiTerminal v4.00 Build 213 (20 Mar 2008)
- Always use the latest (^ABOVE^) MetaQuotes products, saves a lot of nerves. What's new.
"METAQUOTES FOR LIFE!"
The Errors occur in Mode3_MoveSL_Trade_3() function. I think the reason is that
SL is greater OrderOpenPrice() in a Long order and vicaversa in a Short order.
It seems that the EA code is not fully checked if API Errors happen.
I think we should introduce API call checking for each API call and evaluate
GetLastError() if possible. This would make Phoenix more reliable.
I agree, Error Handling is better than Error Reporting only.
The fix for this issue is to call RefreshRates(); then immediately set the SL at current price+ MarketInfo(Symbol(), MODE_STOPLEVEL) for sell orders and Current Price - MarketInfo(Symbol(), MODE_STOPLEVEL) for buy orders.
I'll code this for release end of week if nobody else does. If you do make the change, please post it as a code snippet here.
There can be no signal for entering second position after Phoenix opened first position. That is why I propose to enter second position not by signal, but by distance from the entering point of the first Phoenix position. This second enter should be made between Phoenix SL point and Phoenix Enter point. The closer to SL, the less will be Stoploss of second position, the greater will Takeprofit (distance from entering second position and Breakeven point of first Phoenix position). Simply by having good gain\profit ration we'll get profit.
The only thing is that what is the probability if the price goes -40pips, then returns to breakeven (and goes to Phoenix TP). It is very timeconsuming to test it manually, so it would be great if somenody could add to code of Phoenix several options:
- to enter second ''not Phoenix'' trade when prices goes to -X pips
- SL of that second trade is the same as Phoenix position one
- Take profit - variable (usually - entering price of Phoenix position)
- ability to decrease number of that second trades (as ptice can fluctuates a lot, and btw we can get 2 or 3 trades while holding Phoenix position)
On the whole, this idea is based not on signals, but on statistics, that Phoenix makes a lot of correct entries, which overcome bad entries. Plus, goog gain\loss ratio.
Evaluating current trades in the ways you recommend sounds very valuable I added MaxTrades without any logic so we could see more entry signals. It would be better for debugging if we checked the entry signals, then executed trade if no trades were open. This would be a waste of execution time if we have open trades but can't use them. So I did a quick hack that didn't change the current runtime but might let us see additional entry signals.
If someone is using MaxTrades=5 and signal_count=50 we are waiting a minimum of 50 ticks between executing the last entry signal and starting a new one. If the same entry signal appears again, we are often (from my looking at multiple trade logs over the same period) closer to the peak waiting for the trade reversal. On several occasions the first trade hits SL and the second one wins. Another possibility is the first trade sitting open for days ranging in the 126 pip spread provided, but not closing. The second trade would hit the profit target and exit quickly. I have very advanced tactics for handling these situations in the TS code I have been writing, allowing first trade to exit at a small profit or a small loss and second trade to take the full TP. This TS code is a helper EA and I may eventually merge the code into Phoenix.
Hi guys
is it possible to include the parameters for eur/usd in the code?
if(PrefSettings == true)
{
if((Symbol() == "EURUSD") || (Symbol() == "EURUSDm"))
Is there a problem because Phoenix doesn't work with eur usd?
A team member is currently working EURUSD settings. They will be posted in the Settings Thread when they are complete.
Guys, I suggest you add time and date of last modification as a comment line into the ea. Would be really helpful and well, the more precise the less confusion. Just my 2 cents.
Will do Diamond! I'm also going to title the release descriptions "Change Notes" so they are easier to find.