Forex



Go Back   Forex Trading > Discussion Areas > Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
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.
See more

Reply
 
Thread Tools Display Modes
  #11 (permalink)  
Old 10-29-2009, 12:30 PM
Junior Member
 
Join Date: Oct 2009
Posts: 18
amitoberoi is on a distinguished road
Hi Sangmane,

I tested EmaDI2 for the year 2005, EURUSD in daily chart. I also backtested manually with the same parameters. There i a lot of difference in both. I have attached the strategy tester html report and the manual report in excel sheet. Please have a look. Following were the rules when i tested manually:

While Ema5 is above Ema80:
Buy open when +DI crosses above -DI. Here i open at the opening value of the next bar after the crossing.
Close Buy when +DI crosses down -DI. Here i close at the opening value of the next bar after the crossing.


While Ems5 is below Ema80:
Sell open when -DI crosses above +DI. Here i open at the opening value of the next bar after the crossing.
Close Sell when -DI crosses down +DI. Here i close at the opening value of the next bar after the crossing.


The dates of open and close mentioned in the manual testing report are the next date from the date of crossing and the currency value is the opening value.

Thanks for your time.

Amit
Attached Files
File Type: htm EURUSD 2005 D1.htm (12.3 KB, 8 views)
File Type: pdf EURUSD 2005 d1.pdf (5.7 KB, 8 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #12 (permalink)  
Old 10-29-2009, 07:28 PM
Junior Member
 
Join Date: Apr 2009
Posts: 13
sangmane is on a distinguished road
hi amit,

i feel like we are talking using different language.

could you do the following step:

1. run the EmaDI2 EA, don't forget to tick "Visual Mode"
2. after the EA finish, you'll get a chart with arrows that show the entry and exit. just like the one i've posted on the previous post
3. scroll the chart to the part that contain entry/exit that didn't match the rules.
4. post the chart

after that, we could discuss the EA result based on that chart and fix the problem together.

without the chart, i can't see the wrong logic in my EA accroding to the rules. this strategy is very simple, and so the coding.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #13 (permalink)  
Old 10-29-2009, 08:32 PM
Junior Member
 
Join Date: Oct 2009
Posts: 18
amitoberoi is on a distinguished road
Hi Sangmane,

I tested the EMADI2 using the visual mode as you had instructed and there are some descripancies as shown in the attached jpg. However while testing the transaction where i have placed the red arrow, i noticed something strange. say on a particular date, even though -DI has crossed +DI as can be seen by the naked eye, however their values show that +DI is still higher as can be confirmed by their respective values. Thus in this particular transaction, the EA is selling on the date next to what i am selling because the DI values get updated after a full day and the EA is right in doing so. Is there any workaroung for this.

Also even if we trade manually, will the live account setup be the same as the demo account. Is there any broker where i can open a live account immediately and start trding instead of waiting a long time for the account to open.

Thanks
Amit
Attached Images
File Type: jpg 1.jpg (207.4 KB, 1 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #14 (permalink)  
Old 10-29-2009, 08:48 PM
Junior Member
 
Join Date: Jun 2009
Posts: 14
cosmiclifeform is on a distinguished road
EmaDI-2 - Revised StopLoss and TakeProfit

Hi Amit and Sangmane...

I'm a novice Fx coder and this is a nice little EA to play with and learn from for both the code and the strategy. Thanks.

I tested both the EmaDI and EmaDI-2 and I found that the StopLoss and TakeProfit did not seem to work. I added a formula with "Point" and used // to disable the original code so you could compare both codes.

Most trades look good, but some trades look out of place and on quick glance are hard to match with the strategy. But I did not spend too much time to see how the code is following the strategy at this point.

I also found that longer MA cycles produce more profits (3/50, 5/80, etc) and I reached a 2.75 Profit Factor....still had some major reversals/losses, but these are very tempting results and a nice start for this EA.

Below is what I added to make the StopLoss and TakeProfit to work and I hope it helps.

Good Luck,
Robert

EmaDI-2 EA

FOR BUY

if(MaFast>MaSlow && PlusDI>MinDI && PrevPlusDI<PrevMinDI)
{
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-StopLoss*Point,Ask+TakeProfit*Point,"My EA",16384,0,Green);

//ORIGINAL --- ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,StopLo ss,TakeProfit,"My EA",16384,0,Green);

FOR SELL

if(MaFast<MaSlow && PlusDI<MinDI && PrevPlusDI>PrevMinDI)
{
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Bid+S topLoss*Point,Bid-TakeProfit*Point,"My EA",16384,0,Red);

//ORIGINAL --- ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,StopL oss,TakeProfit,"My EA",16384,0,Red);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #15 (permalink)  
Old 10-29-2009, 10:32 PM
Junior Member
 
Join Date: Jun 2009
Posts: 14
cosmiclifeform is on a distinguished road
EmaDI-2 - Strategy Tests

I did a few tests with the EA and it seems to be very accurate. Nice coding.

However....like any EA, it hits noisy periods or quick reversals that need more filtering.

SL and TP are strategies to deal with them, but maybe another filter or additional strategies, like X_pips to cross, or other confirmations are needed?

Overall nice job! Here are a few charts to review and consider.
Robert
Attached Images
File Type: gif emadi-2 -buy with reversals.gif (20.8 KB, 21 views)
File Type: gif emadi-2 - noisy entry.gif (20.3 KB, 21 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #16 (permalink)  
Old 10-30-2009, 02:54 AM
Junior Member
 
Join Date: Apr 2009
Posts: 13
sangmane is on a distinguished road
hi cosmiclifeform,

thanks for your comment about the EA. yes you are right, i wrongly coded the SL and TP as i concentrate on the original rules that not using SL and TP. that's why i put TP=0 and SL=0 in the external variable

pls find the corrected code. please note that for 5 digit broker, 1 pips = 10 point so for example TP/SL = 50 pips, you should input 500 instaed of 50

for amit, i'm waiting for your attachment approved. hope we can clear the things up together...

cheers
Attached Files
File Type: mq4 EmaDI2.mq4 (2.7 KB, 10 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #17 (permalink)  
Old 10-30-2009, 11:01 PM
Junior Member
 
Join Date: Oct 2009
Posts: 18
amitoberoi is on a distinguished road
Hi Sangmane and Cosmiclifeform,

Thanks for all ur help here.
Sangmane, i tested the latest EMADI2 but it says "Error processing buy/sell orders" when i try to use strategy tester.

I think the difference in what i am doing manually and the EA is doing automatically is that the EA is probably taking the closing value of that particular period in which the DI cross is happening. Is it possible to take the value for placing an order the exact moment the DI cross is taking place.

Forgive me if my fundas are not clear and the above mentioned is not making any sense. :-).

Amit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #18 (permalink)  
Old 10-31-2009, 09:37 AM
Junior Member
 
Join Date: Oct 2009
Posts: 18
amitoberoi is on a distinguished road
Hi,

Another couple of systems i tried and i think are worth a look.


System 1
VQ indicator
ADX14

Buy- When VQ gives a buy indication and +DI is above -DI.
Close buy- When +DI goes below -DI or VQ gives a sell signal.

Sell- When VQ gives a sell signal and -DI is above +DI.
Close Sell- When -DI goes below +DI or VQ gives a buy signal.

No SL or TP.


System 2
VQ indicator
EMA5
EMA80

Buy- When VQ gives a buy signal and EMA5 is above EMA80.
Close Buy- When VQ gives a sell signal or EMA5 goes below EMA80.

Sell- When VQ gives a sell signal and EMA5 is Below EMA80.
Close Sell- When VQ gives a buy signal or EMA5 goes above EMA80.

No SL or TP.


Here i would like to mention that VQ does not wait for the completion of the bar to give a signal and may give the signal in between of the chosen time frame and so the buy/sell should be executed at the instant VQ gives the signal. Also The Buy close/Sell close signal depending on the EMA or DI cross should be executed the instant the cross takes place and should not wait for the bar to close.


Thanks

Amit
Attached Files
File Type: mq4 VQ.mq4 (7.1 KB, 6 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
RSI Expert Advisor TF2K Suggestions for Trading Systems 5 03-21-2009 05:24 PM
Need Help on Straddle advisor eatrader Metatrader 4 18 06-26-2008 11:55 AM
Need Help w/Expert Advisor cochran1 Expert Advisors - Metatrader 4 14 08-01-2007 04:55 PM
Help with MT3 Advisor eatrader Metatrader 3 0 05-18-2006 01:29 AM


All times are GMT. The time now is 10:07 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.