Experts: EA Template

 

EA Template:

A slightly optimized EA template from article MetaEditor: Templates as a Spot to Stand On

Author: MetaQuotes Software Corp.

 

Sir, Your template is brilliant.  Would you happen to have a copy with the comments in English?  Thank you.

 

testing: http://img145.imageshack.us/img145/7718/05st2.jpg

2 wee, deposit inictial 5000

 

Yeah this is a really sweet template, but unusable really since the comments are not in english :(

 

I don't understand how this template example(Osc_test) controls how many orders to opens and where close order functions( formula) should be placed ?!


Can you explain please?!


1. I want to open one market order at beginning of a bar, if there is a signal( BUY or SELL) for opening, no matter is there any other opened orders(BUY or SELL) in terminal. So no limitation for opening new( only market) orders.


2. If there is a signal for closing orders and few or all of orders fulfil all conditions then close all orders at same bar that satisfy closing conditions, no matter how may orders should be closed.



Very simple Example: 15 Minute Chart

0:00 Signal for Buy Order( Open one market order at Bar Open) #1
0:15 Signal for Buy Order( Open one market order at Bar Open) #2
0:30 Signal for Buy Order( Open one market order at Bar Open) #3
0:30 Signal for Closing Buy Order #1( Close only Buy Order that satisfy condition in same bar, no matter that EA opened new order at same time)

.


0:45 Signal for Buy Order( Open one market order at Bar Open) #4
1:00 Signal for Sell Order( Open one market order at Bar Open) #5
1:15 Signal for Sell Order( Open one market order at Bar Open) #6
1:15 Signal for Closing Buy Orders # 2 and 3( Close only Buy Orders that satisfy condition in same bar, no matter that EA opened new order at same time)

.


....


and so on



I don't see how to program this into EA Template, so can you explain in detail how to control new orders and closing orders in EA Template?

 

Excellent work on professional coding, working with arrays and functions, but from the tital I was more focused on heavy construction using templates. Based on the help docs, I get the impression it is a collection of xml with macros, going through the original post on this subject, I can just select a well built EA and it becomes a template. Does this mean that all changes to that EA now update the entire collection of code that used the template from the beginning or is it only good the first time and from that point on it is pretty much useless? I don't know, because this document would be better served on teaching newbies how to properly construct an EA, than it was on how to manage, manipulate or take strong advantage of a template.