extern int Magic = 1110;
extern double Lots = 1.0;
extern int SL = 25;
extern int TP = 5;
extern int Start = 21;
extern int End = 6;
extern double RSI_BUY = 30;
extern double RSI_SELL = 70;
extern int RSI_PERIOD = 10;
extern int RSI_TF = 1;
extern bool MM = false;
extern int LotsPercent = 10;
extern int MaxOpenTime_BUY = 10;
extern int MaxOpenTime_SELL = 10;
int MaxLot = 100;
double MinLot = 0.01;
double RSI_BUY_Zera = 40;
double RSI_SELL_Zera = 60;
bool Compra = true;
bool Venda = true;
int i,tmp,ordtotal,closeprice,cnt,total;
int isMgNum(int magic)
{
ordtotal = OrdersTotal();
for ( i = 0; i < ordtotal; i++)
{
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
if ((OrderMagicNumber() == magic) && (OrderSymbol() == Symbol())) return(1);
}
}
int init()
{
// код доступен только после оплаты
}
int deinit()
{
return(0);
}
int start()
{
// код доступен только после оплаты
}
double free;
tmp = (TimeCurrent()-OrderOpenTime())/36000.0;
if (AccountFreeMargin() < free * 150.0) return(0);
if (MM)
{
if (LotsPercent > 0)
Lots = NormalizeDouble(MathCeil(AccountFreeMargin() / 1000.0 * LotsPercent) / 10.0,1);
else
Lots = Lots;
}
if (Lots < MinLot) Lots = MinLot;
if (Lots > MaxLot) Lots = MaxLot;
double IN;
double RSI_1 = iRSI(NULL, RSI_TF, RSI_PERIOD, PRICE_CLOSE, 0);
double RSI_2 = iRSI(NULL, RSI_TF, RSI_PERIOD, PRICE_CLOSE, 1);
Comment("Trading hours: ",Start," to ",End,"\n","Trading is disabled");
if ((Start < End) && ((TimeHour(TimeCurrent()) < Start ) || (TimeHour(TimeCurrent()) >= End))) return(0);
else
if ((Start > End) && ((TimeHour(TimeCurrent()) < Start ) && (TimeHour(TimeCurrent()) >= End))) return(0);
else
Comment("Trading hours: ",Start," to ",End,"\n","Trading is enabled");
IN = NormaliПоказано первые 50% кода (символов: 2694)
Введите ваш email и нажмите кнопку, чтобы перейти к оплате.