Trabalho concluído
Termos de Referência
First of all , open trade features.
options: Wait close on bar or open when hit bands or pending orders (x pips)
A.Buy open 2 order, (X lots) Ex. 0.01 + 0.01
E. Close take profit 1 order when hits median band
B. buy open 2 order again and rules the same as A
F. close take profit one order when hits median band same as E.
C.Closed all opened buy orders and reverse.
SELL signal near 1690.85 and opened 2 sell 0.01 + 0.01
G. close take profit one order when hits median band
D. SELL signal near 1692.10 and opened 2 sell 0.01 + 0.01
H. lose take profit one order when hits median band
these are basic trade structure.
But I want to add some money management features
-
If expert has opened trades, and give new same direction signal;
open new trades if X minutes have passed. Example 15 minutes.
in our examples, We have 1 opened order in A story. And when B signals come, When the B signal comes, the expert should check whether he has a position. and if expert is going to open a new position, expert should check that at least the specified time has passed. If the specified time has passed, expert should open new B positions.
-
Take profit for all opened orders $ dollar. closed all orders when hit X dollars profit.
-
Calculate opened orders avarege and closed if hit X pips.
Example 0.01 buy 1614 + 0.01 buy 1611 + 0.01 16.10
Avarage (1614+1611+1610)/3 = 1611,66
When price hit 1611,66 closed all opened orders and wait new signal.
-
maximum opened trades limit.
Example. maximum opened trade limit is 0.6 lot. and expert have 0.06 lot.
expert should not open trade even if new signal comes
-
Maximum stopploss dolar limit.
When X dollars loss, closed all profit and wait new signals.
-
Daily hours limit.
Action only for opened trades (will close) but must not open new trade in limit time.
-
Lots (set 0.01 or other)