| |
 |
5min USDCHF
|
 |
|
|
|
Views:
2122 |
| Added: November 16, 2008 |
| |
|
|
|
| This formula has not been rated yet |
| |
| |
email this link
|
| |
| |
| Tags:
MetaTrader, system
|
| |
 |
USDCHF expert for 5 min timeframe.
Code:
/*[[
Name := 5minUSDCHF
Author := Copyright © 2003, Company
Link := http://www.company.com/
Notes :=
Lots := 1
Stop Loss := 40
Take Profit := 85
Trailing Stop := 50
]]*/
defines: d(12), mm(0), risk(0.05), thr(70), thr2(60);
var: cnt(0), Current(0), tmp(0), TrStop(0), bar(0), AroonU(0), AroonD(0), AroonU1(0), AroonD1(0);
var: D1(500), Lotsi(0), sH(3);
if mm<>0 then
Lotsi=Round(1*Balance*risk*C/StopLoss)/10
else
Lotsi=Lots;
AroonU=iCustom(\"Aroon\",d,MODE_FIRST,1); AroonD=iCustom(\"Aroon\",d,MODE_SECOND,1);
AroonU1=iCustom(\"Aroon\",d,MODE_FIRST,2); AroonD1=iCustom(\"Aroon\",d,MODE_SECOND,2);
if DayOfWeek<7 and TotalTrades<1 and Hour >= sH and Hour < 18 and CurTime-LastTradeTime>60
and (H[Highest(MODE_HIGH,D1,D1)]-L[Lowest(MODE_LOW,D1,D1)])<=0.021 then
{
if AroonU>=thr and AroonU1
{
SetOrder(OP_BUY,Lotsi,Ask,2,Ask-StopLoss*Point,Ask+TakeProfit*Point,GREEN);
};
if AroonD>=thr and AroonD1
{
SetOrder(OP_SELL,Lotsi,Bid,2,Bid+StopLoss*Point,Bid-TakeProfit*Point,RED);
};
};
TrStop=TrailingStop*Point;
for cnt=1 to TotalTrades
begin
If Ord(cnt,VAL_SYMBOL)=Symbol and Ord(cnt,VAL_TYPE)=OP_BUY then
{
tmp=H-TrStop;
If Ord(cnt,VAL_STOPLOSS)
{
ModifyOrder(Ord(cnt,VAL_TICKET),Ord(cnt,VAL_OPENPRICE),tmp,Ord(cnt,VAL_TAKEPROFIT),Green);
Exit;
};
};
If Ord(cnt,VAL_SYMBOL)=Symbol and Ord(cnt,VAL_TYPE)=OP_SELL then
{
tmp=L+TrStop;
If Ord(cnt,VAL_STOPLOSS)>tmp then
{
ModifyOrder(Ord(cnt,VAL_TICKET),Ord(cnt,VAL_OPENPRICE),tmp,Ord(cnt,VAL_TAKEPROFIT),Red);
Exit;
};
};
end;
Code to difficult? Find somebody to help you with coding here.
Source: www.xeatrade.com
all systems for MetaTrader
all systems
|