Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Metatrader 4


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-21-2007, 02:37 PM
Junior Member
 
Join Date: Mar 2007
Posts: 3
stepwise is on a distinguished road
MT4 (Basic) Questions

Hi All,

New to MT4 programming. I have most of my EA programmed but I wasn't sure how to determine the following:

1. How do I know when a pending order becomes an open order (i.e. filled)? I checked the documentation but I couldn't find how to distinguish between these two.

2. Is the only way to backtest by running the strategy tester? I was hoping to run a 6 month backtest - naturally this would take a long time using the Strategy Tester....I assume an alternative would be via code - hoping for any samples or advice on how to best do this.

Many thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-21-2007, 03:56 PM
Member
 
Join Date: Nov 2005
Posts: 49
4xCoder is on a distinguished road
1. How do I know when a pending order becomes an open order (i.e. filled)?
Pending orders are OP_BUYLIMIT/OP_BUYSTOP, while an open order is OP_BUY. Same for sell orders

2. Is the only way to backtest by running the strategy tester? I was hoping to run a 6 month backtest - naturally this would take a long time using the Strategy Tester....I assume an alternative would be via code - hoping for any samples or advice on how to best do this.
When I start with a new stragtegy, I'll write an inidcator that displays entry and exit points on the chart, and prints the number of pips to the log. You can also color bars durning the trading similar to what Heiken-Ashi does. While not anywhere near as accurate as backtesting, it let's you eye-ball things and see if the strategy is worth presuing.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-21-2007, 04:03 PM
Junior Member
 
Join Date: Mar 2007
Posts: 3
stepwise is on a distinguished road
Quote:
Originally Posted by 4xCoder
1. How do I know when a pending order becomes an open order (i.e. filled)?
Pending orders are OP_BUYLIMIT/OP_BUYSTOP, while an open order is OP_BUY. Same for sell orders

2. Is the only way to backtest by running the strategy tester? I was hoping to run a 6 month backtest - naturally this would take a long time using the Strategy Tester....I assume an alternative would be via code - hoping for any samples or advice on how to best do this.
When I start with a new stragtegy, I'll write an inidcator that displays entry and exit points on the chart, and prints the number of pips to the log. You can also color bars durning the trading similar to what Heiken-Ashi does. While not anywhere near as accurate as backtesting, it let's you eye-ball things and see if the strategy is worth presuing.

Thanks!

So, just so I understand - if I use OrderSend with OP_BUYLIMIT and it returns say 123 for my ticket number.

Are you saying that if/when my order gets picked up it will change that same order (ticket 123) to the type OP_BUY?

With regards to the backtesting....I don't mind "Printing' or otherwise outputting what the trades would have done.....but I guess using the close of bars is the only way to exit to get any kind of accuracy.

Also, would this be just a matter of looping from the start of the chart to the end of the chart? Would you normally add a parameter for "Backtest" where if it's true loop back and back test otherwise, it is treated as a "live" EA?

I guess the other option is to let the Strategy Tester run for a very long time?

Thanks again!

Last edited by stepwise; 05-21-2007 at 04:10 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 09-22-2008, 01:03 AM
Junior Member
 
Join Date: Jul 2007
Posts: 9
marlow2007 is on a distinguished road
Need help

Hi,
Can anyone help me? I have an EA that has made me 200-500 pips per week. I want to market the EA but I dont want anyone to know the code. Is there any way that I can hide the code so that no one knows?

Thanks

Marlow
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 09-22-2008, 01:36 AM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 703
wolfe is on a distinguished road
Quote:
Originally Posted by marlow2007 View Post
Hi,
Can anyone help me? I have an EA that has made me 200-500 pips per week. I want to market the EA but I dont want anyone to know the code. Is there any way that I can hide the code so that no one knows?

Thanks

Marlow
WOW! 200-500 pips a week! Why would you want to market such an ATM machine?

Seems like you could all but print money with this amazing EA of yours!

Don't worry about "marketing" this one, just retire with it! HeHe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 09-22-2008, 02:17 AM
Junior Member
 
Join Date: Jul 2007
Posts: 9
marlow2007 is on a distinguished road
Quote:
Originally Posted by wolfe View Post
WOW! 200-500 pips a week! Why would you want to market such an ATM machine?

Seems like you could all but print money with this amazing EA of yours!

Don't worry about "marketing" this one, just retire with it! HeHe

Yeah,
I know but I have been trying to create this EA for 5 years now and I finally
have it made and tested. I need the starting capital. Im looking to get $5000 USD then I will quit selling it just enough to get started.

CAN ANYONE HELP? I need to hide the contents to the code so I can market this EA. Thank you

Marlow
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 09-22-2008, 02:22 AM
Linuxser's Avatar
Moderator
 
Join Date: May 2006
Location: Helliconia (Spring)
Posts: 2,815
Blog Entries: 31
Linuxser has disabled reputation
Quote:
Originally Posted by marlow2007 View Post
Yeah,
I know but I have been trying to create this EA for 5 years now and I finally
have it made and tested. I need the starting capital. Im looking to get $5000 USD then I will quit selling it just enough to get started.

CAN ANYONE HELP? I need to hide the contents to the code so I can market this EA. Thank you

Marlow
You could offer your product as signal with our new forum service: Rent a Signal service
__________________
Elite Manual Trading | Portfolio | Calendar | Suggestions to improve the forum | My Blog

Remember: Signatures must have three lines as maximum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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
Basic questions ... cardio Questions 72 10-08-2008 07:44 PM
Basic Indicator Question waaustin Metatrader Programming 8 04-02-2008 02:54 PM
Need Help Understanding Basic MQL logic Emerald King Expert Advisors - Metatrader 4 7 02-27-2007 09:59 AM
Very basic coding help needed camisa Questions 1 05-08-2006 05:36 PM


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



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