#property version "2.00"
#property description "We crack MT4 n MT5 Indicators/Robots."
#property description "We convert MT4/MT5 Indicators to Robots."
#property description "."
#property description "CRACKED BY @Subzero_911"
#property description "."
#property description "Instagram = @Subzero_911_"
#property description "."
#property description "Telegram = @Subzero_911"
#property strict
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_plots 2
#property indicator_color1 clrBlue
#property indicator_color2 clrOrange
#property indicator_width1 1
#property indicator_width2 1
input string g_sig = "--- Señales y Medias ---";
input int ema9_p = 9; // EMA 9
input int ema21_p = 21; // EMA 21
input color c_buy = clrLime; // Compra
input color c_sell = clrRed; // Venta
input string g_nwog = "--- Configuración NWOG ---";
input color c_nwog = clrGold; // Color NWOG
double ema9Buffer[];
double ema21Buffer[];
int lastBar = 0;
double lastWeeklyClose = 0;
datetime lastWeekStart = 0;
int boxHandle = -1;
int tableHandle = -1;
int OnInit()
{
// код доступен только после оплаты
}
void OnDeinit(const int reason)
{
ObjectsDeleteAll(0, "SMC_");
ObjectsDeleteAll(0, "NWOG_");
ObjectsDeleteAll(0, "Table_");
Comment("");
}
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
// код доступен только после оплаты
}
int limit;
if(prev_calculated == 0)
{
limit = rates_total - 1;
}
else
{
limit = rates_total - prev_calculated;
}
for(int i = limit; i >= 0; i--)
{
if(i + ema9_p < rates_total)
{
ema9Buffer[i] = iMA(NULL, 0, ema9_p, 0, MODE_EMA, PRICE_CLOSE, i);
}
if(i + ema21_p < rates_total)
{
ema21Buffer[i] = iMA(NULL, 0, ema21_p, 0, MODE_EMA, PRICE_CLOSE, i);
}
}
for(int i = limit; i >= 0; i--)
{
if(i + 1 >= rates_total) continue;
datetime currentTime = time[i];
datetime dayStart = iTime(NULL, PERIOD_D1, iBarShift(NULL, PERIOD_D1, currentTime));
int dailyIndex = iBarShift(NULL, PERIOD_D1, currentTime);
double d_o = iOpen(NULL, PERIOD_D1, dailyIndex);
double d_h = iHigh(NULL, PERIOD_D1, dailyIndex);
double d_l = iLow(NULL, PERIOD_D1, dailyIndex);
double d_c = iClose(NULL, PERIOD_D1, dailyIndex);
double prev_d_c = 0;
if(dailyIndex + 1 < iBars(NULL, PERIOD_D1))
{
prev_d_c = iClose(NULL, PERIOD_D1, dailyIndex + 1);
}
bool is_bullish = false;
if(prev_d_c > 0)
{
is_bullish = prev_d_c > ((d_h + d_l) / 2);
}
bool is_premium = close[i] > d_o;
bool is_discount = close[i] < d_o;
bool cross_up = false;
bool cross_dn = false;
if(i + 1 < rates_total)
{
cross_up = ema9Buffer[i] > ema21Buffer[i] && ema9Buffer[i+1] <= ema21Buffer[i+1];
cross_dn = ema9Buffer[i] < ema21Buffer[i] && ema9Buffer[i+1] >= ema21Buffer[i+1];
}
if(cross_up && is_bullish && is_discount)
{
string labelName = "SMC_BUY_" + IntegerToString(i);
if(ObjectFind(0, labelName) < 0)
{
ObjectCreate(0, labelName, OBJ_ARROW_BUY, 0, time[i], low[i]);
ObjectSetInteger(0, labelName, OBJPROP_ARROWCODE, 233);
ObjectSetInteger(0, labelName, OBJPROP_COLOR, c_buy);
ObjectSetInteger(0, labelName, OBJPROP_WIDTH, 2);
ObjectSetInteger(0, labelName, OBJPROP_BACK, false);
string textName = "SMC_BUY_TEXT_" + IntegerToString(i);
ObjectCreate(0, textName, OBJ_TEXT, 0, time[i], low[i] - 10 * Point);
ObjectSetString(0, textName, OBJPROP_TEXT, "BUY PRO");
ObjectSetInteger(0, textName, OBJPROP_COLOR, clrWhite);
ObjectSetInteger(0, textName, OBJPROP_FONTSIZE, 8);
ObjectSetInteger(0, textName, OBJPROP_BACK, false);
}
}
if(cross_dn && !is_bullish && is_premium)
{
string labelName = "SMC_SELL_" + IntegerToString(i);
if(ObjectFind(0, labelName) < 0)
{
ObjectCreate(0, labelName, OBJ_ARROW_SELL, 0, time[i], high[i]);
ObjectSetInteger(0, labelName, OBJPROP_ARROWCODE, 234);
ObjectSetInteger(0, labelName, OBJPROP_COLOR, c_sell);
ObjectSetInteger(0, labelName, OBJPROP_WIDTH, 2);
ObjectSetInteger(0, labelName, OBJPROP_BACK, false);
string textName = "SMC_SELL_TEXT_" + IntegerToString(i);
ObjectCreate(0, textName, OBJ_TEXT, 0, time[i], high[i] + 10 * Point);
ObjectSetString(0, textName, OBJPROP_TEXT, "SELL PRO");
ObjectSetInteger(0, textName, OBJPROP_COLOR, clrWhite);
ObjectSetInteger(0, textName, OBJPROP_FONTSIZE, 8);
ObjectSetInteger(0, textName, OBJPROP_BACK, false);
}
}
MqlDateTime currentStruct;
TimeToStruct(currentTime, currentStruct);
MqlDateTime prevStruct;
prevStruct.day_of_week = 0;
if(i + 1 < rates_total)
{
TimeToStruct(time[i+1], prevStruct);
}
if(currentStruct.day_of_week == 1 && (i + 1 >= rates_total || prevStruct.day_of_week > currentStruct.day_of_week))
{
int weeklyShift = iBarShift(NULL, PERIOD_W1, currentTime) + 1;
if(weeklyShift < iBars(NULL, PERIOD_W1))
{
lastWeeklyClose = iClose(NULL, PERIOD_W1, weeklyShift);
lastWeekStart = currentTime;
if(boxHandle >= 0)
{
Показано первые 50% кода (символов: 9532)
Введите ваш email и нажмите кнопку, чтобы перейти к оплате.