БУ не работаету меня стоит 200 и 50 и все работает
БУ не работаету меня стоит 200 и 50 и все работает
Ссылка на сайт советникау тебя сайт хороший получился. на каком движке делал или конструктор?
KLot=1.7 StopLoss=24000 TakeProfit=110 MA=8 Step=400 Lots=0.1 MaxLot=5
больше модуля 3.о(обычный размер максимума/минимума)что это?
Привет, а этот тоже декомпил? Вроде автор выкладывал. disk.yandex.ru/d/rJXI4v7jR4tSWw
int Gi_164 = 4;
int Gi_168;
int Gi_172;
int G_bars_176;
int G_bars_180;
string Gs_184;
bool Gi_192;
int Gia_196[];
int Gia_200[];
double Gda_204[];
double Gda_208[];
string Gsa_212[];
//+------------------------------------------------------------------+
//| CandleWay.mq4 |
//| Copyright 2021, AM2 |
//| http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2021, AM2"
#property link "http://www.forexsystems.biz"
#property version "1.00"
#property strict
//--- Inputs
extern double Lots = 0.1; // лот
extern double KLot = 2; // умножение лота
extern double MaxLot = 5; // максимальный лот
extern int StopLoss = 20; // лось
extern int TakeProfit = 30; // язь
extern int Count = 11; // число сделок на свече
extern int Slip = 30; // реквот
extern int Magic = 123; // магик
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//---
Comment("");
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
Comment("");
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void PutOrder(int type,double price)
{
int r=0;
color clr=Green;
double sl=0,tp=0;
if(type==1 || type==3 || type==5)
{
clr=Red;
if(StopLoss>0)
sl=NormalizeDouble(price+StopLoss*_Point,_Digits);
if(TakeProfit>0)
tp=NormalizeDouble(price-TakeProfit*_Point,_Digits);
}
if(type==0 || type==2 || type==4)
{
clr=Blue;
if(StopLoss>0)
sl=NormalizeDouble(price-StopLoss*_Point,_Digits);
if(TakeProfit>0)
tp=NormalizeDouble(price+TakeProfit*_Point,_Digits);
}
r=OrderSend(NULL,type,Lot(),NormalizeDouble(price,_Digits),Slip,sl,tp,"",Magic,0,clr);
return;
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
double Lot()
{
double lot=Lots;
for(int i=OrdersHistoryTotal()-1; i>=0; i--)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY))
{
if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
{
if(OrderProfit()>0)
break;
if(OrderProfit()<0)
{
lot=OrderLots()*KLot;
break;
}
}
}
}
if(lot>MaxLot)
lot=Lots;
return(lot);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int CountTrades()
{
int count=0;
for(int i=OrdersTotal()-1; i>=0; i--)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{
if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
{
if(OrderType()<2)
count++;
}
}
}
return(count);
}
//+------------------------------------------------------------------+
//| Число сделок за свечу |
//+------------------------------------------------------------------+
int CountCandleDeal()
{
int count=0;
for(int i=OrdersHistoryTotal()-1; i>=0; i--)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY))
{
if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
{
if(OrderCloseTime()>iTime(NULL,0,0))
count++;
}
}
}
return(count);
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
if(CountTrades()<1 && CountCandleDeal()<Count)
{
if(Bid>Open[0])
PutOrder(1,Bid);
if(Bid<Open[0])
PutOrder(0,Ask);
}
Comment("\n Count Candle Deals: ",CountCandleDeal());
}
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
AM2