Forex



Go Back   Forex Trading > Training > Metatrader > Metatrader 4 mql 4 - Development course > Lessons
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 05-13-2006, 03:46 PM
Junior Member
 
Join Date: Apr 2006
Posts: 5
DojiSan is on a distinguished road
Simultaneous Orders

Hi Guru,

Could you make a small tutorial on how to open orders at the same time when eA is attached to different pairs? (the tutorial trades only one at a time.) I would like to trade many at a time, is this possible?
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 05-15-2006, 04:05 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Quote:
Originally Posted by DojiSan
Hi Guru,

Could you make a small tutorial on how to open orders at the same time when eA is attached to different pairs? (the tutorial trades only one at a time.) I would like to trade many at a time, is this possible?
Please check this article:

http://www.metatrader.info/node/124
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
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 09-20-2006, 05:10 PM
Junior Member
 
Join Date: Jan 2006
Posts: 8
govinda is on a distinguished road
Thank you Codersguru. I am learning a lot from your lessons.

There is one question I would like to ask you.

Looks like your Expert Advisor is opening order at any time when 8/13ema cross takes place.
My question is what to do to force EA to open order exactly at the end of the candle, when the cross is really confirmed?

Regards
Govinda
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 09-20-2006, 05:26 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Smile

Quote:
Originally Posted by govinda
Thank you Codersguru. I am learning a lot from your lessons.

There is one question I would like to ask you.

Looks like your Expert Advisor is opening order at any time when 8/13ema cross takes place.
My question is what to do to force EA to open order exactly at the end of the candle, when the cross is really confirmed?

Regards
Govinda
Hi Govinda,

Thanks for you interest!

Use the cross of the previous bars:

PHP Code:
trend1 iMA(NULL,0,8,0,MODE_EMA,PRICE_CLOSE,1);
trend2 iMA(NULL,0,13,0,MODE_EMA,PRICE_CLOSE,2);
trend3 iMA(NULL,0,8,0,MODE_EMA,PRICE_CLOSE,1);
trend4 iMA(NULL,0,13,0,MODE_EMA,PRICE_CLOSE,2);

bool BuyCondition false SellCondition false CloseBuyCondition false CloseSellCondition false 
   
   if(
trend1 trend2 && trend3 trend4)
   {
       
BuyCondition true;
       
CloseSellCondition true;
   }
      
   if(
trend1 trend2 && trend3 trend4)
   {
       
SellCondition true;
       
CloseBuyCondition true;
   } 
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
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 09-20-2006, 05:47 PM
Junior Member
 
Join Date: Jan 2006
Posts: 8
govinda is on a distinguished road
Thank you very much for your fast reply.
I will have to digest and implement this peace of code... It may take some time...
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 09-20-2006, 07:59 PM
Junior Member
 
Join Date: Jan 2006
Posts: 8
govinda is on a distinguished road
OK. Looks like the key element here is “int shift” value of iMA function. Thanks for that clue CodersGuru

I have one more question to you

I also noticed that The EA does not reverse the position. At least my strategy tester did not find such reversals...
When the position is opened after the 8/13ema long cross very often it is closed when opposite cross appears. That is OK. But why after closing long position because of short ema cross the short position is not opened immediately (simultaneously)?
In this way strategy is loosing its full potential... I think...

Could you give some clue how to fix it?

With regards
govinda
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-05-2006, 06:42 AM
Junior Member
 
Join Date: Sep 2006
Posts: 23
JRtrader is on a distinguished road
Amazing course but needs updated link index

An amazing course codersguru.

If you want to make the course even more accessible and useful, I would suggest an index of links to all lessons and appendices at the start of the thread (or maybe at http://www.forex-tsd.com/lessons/ ) - kept up to date.

http://www.forex-tsd.com/3746-post20.html contains an index to Lesson 14 and Appendices 1 and 2 but doesn't includes Lessons 15-18.

And there's probably more to come!

Thanx for all your hard work

JRtrader
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

Tags
lesson


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
CCI Expert Advisor rodrigokaus Expert Advisors - Metatrader 4 26 07-20-2009 06:36 AM
Lesson 13 - Your First Expert Advisor (Part 1) codersguru Lessons 21 02-07-2009 11:52 AM
Lesson 14 - Your First Expert Advisor (Part 2) codersguru Lessons 12 07-04-2008 10:35 AM
Lesson 15 - Your First Expert Advisor (Part 3) codersguru Lessons 5 12-27-2005 11:00 PM


All times are GMT. The time now is 12:13 PM.



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