View Single Post
  #4 (permalink)  
Old 12-22-2005, 10:00 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow You're welcome!

Quote:
Originally Posted by trevman2005
that worked, very much appreciated, but why the "ticket" and "orderselect" i'm reading through your tutorials atm, i apologise if i missed this info. thanks again.
You're welcome!


If you noticed the code:


1- I've changed

if(Close[2]<ma && Close[1]>ma)

To:

if(Close[1]<ma && Close[0]>ma)

Because the index of the new bar is 0 and the index of the previous one is 1.


2- I used ticket and OrderSelect only to check what the wrong (if any) is.
(Please prefer to
Appendix 2 - Trading functions)


3- I've changed stop to stop*Point and profit to profit*Point.
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Reply With Quote