Работа завершена
Техническое задание
MQL 4 programmer to change signal to work correctly .
following code works to give signal , but the following part of the code does not work for price distance of 40,000 from high .
if(Bid >= iHigh(NULL, PERIOD_D1, iHighest(NULL, PERIOD_D1, MODE_HIGH, 180, 1)) - 10000 * _Point)
if(Bid >= iHigh(NULL, PERIOD_D1, iHighest(NULL, PERIOD_D1, MODE_HIGH, 180, 1)) - 40000 * _Point)
EA WILL NOT BE PROVIDED
This is the full code for the signai
if(ar_useSign2[global_z])
{
//New signal will be signal+step +custom slippage level = signal price
//(if this value is less than this signal price , enter buy trade , if price is > than signal+ step).
int shift = 0;
if(ar_useMonday[global_z])
shift = DayOfWeek() - 1;
datetime time = iTime(NULL, PERIOD_D1, shift) + ar_hourStart[global_z] * 60 * 60 + ar_minuteStart[global_z] * 60;
double monday_price = iOpen(NULL, PERIOD_H1, iBarShift(NULL, PERIOD_H1, time));
if(TimeCurrent() >= time)
if(MathAbs(Bid - monday_price) <= ar_CustomSlippage[global_z]*Point)
// if(iLow(NULL, PERIOD_H1, 1) > iMA(NULL, PERIOD_D1, 60, 0, MODE_LWMA, PRICE_CLOSE, 1))
// if(iLow(NULL, PERIOD_H1, 1) > iMA(NULL, PERIOD_D1, 30, 0, MODE_LWMA, PRICE_CLOSE, 1))
if(Bid >= iHigh(NULL, PERIOD_D1, iHighest(NULL, PERIOD_D1, MODE_HIGH, 180, 1)) - 10000 * _Point)
if(Bid >= iHigh(NULL, PERIOD_D1, iHighest(NULL, PERIOD_D1, MODE_HIGH, 180, 1)) - 40000 * _Point)
{
ar_message[global_z] = "Signal 2 buy";
price = monday_price;
return 1;
}
}