0
extern string Name ="== ExpGalaxyGK.v2.2Night ==";
extern string Nastroiki ="== Настройки советника ==";
extern double Lots = 50;
extern string Expiration = «5»;
extern int Slippage = 5;
extern int Magic = 12345;
extern double LotExponent = 2;
extern double MaxLot = 10000;
extern double KLot = 50;

double lot;
double OPEN1;
double CLOSE1;
double LOW1;
double HIGH1;

double OPEN2;
double CLOSE2;
double LOW2;
double HIGH2;

double OPEN3;
double CLOSE3;
double LOW3;
double HIGH3;

//----------------------------------------
Здесь расчет

//----------------------------------------
double Lot()
{
if(OrdersHistoryTotal()==0)
{
lot=Lots;
}
if(OrderSelect(OrdersHistoryTotal()-1,SELECT_BY_POS,MODE_HISTORY))
{
if(OrderProfit()>0)
{
lot=Lots;
}
if(OrderProfit()<=0)
{
lot=OrderLots()*KLot;
}
}
if(lot>MaxLot)lot=MaxLot;
return(lot);
}
//+------------------------------------------------------------------+
avatar

Petrov210217

  • 14 ноября 2016, 21:27