Если Вы хотите заказать советник или индикатор, то публикуйте в эту группу тех. задание. Если Ваш заказ не очень сложный, то велика вероятность, что Вам его смогут сделать даже бесплатно
Программистам MQL: подпишитесь на группу, чтобы получать уведомления о заказах.
немного подправил, переписал в МТ4, но все равно непонятно для чего все это.
//+------------------------------------------------------------------+ //| Professional Trader Lab EA by profnas100 | //| Trading during London Session | //| Copyright 2023, profnas100 | //+------------------------------------------------------------------+
// Define variables double previousHigh, previousLow, fairValueGap; int targetPips =20;
// Define London session start and end times in broker server time input string symb ="EURUSD"; input string londonSessionStart ="08:00";// Adjust the time based on your broker's server time input string londonSessionEnd ="16:00";// Adjust the time based on your broker's server time
//+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ intOnInit() { // Print a message when the EA is initialized Print("Professional Trader Lab EA initialized");
// EA initialization logic, if any return(INIT_SUCCEEDED); }
//+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ voidOnTick() { // Check if the current time is within the London session //if(TimeCurrent() >= StringToTime(londonSessionStart) && TimeCurrent() <= StringToTime(londonSessionEnd)) { // Get previous M15 high and low previousHigh = iHigh(symb,0,2); previousLow = iLow(symb,0,2);
// Calculate fair value gap fairValueGap =(previousHigh + previousLow)/2;
// Check for a market structure shift if(iHigh(symb,0,1)> previousHigh && iLow(symb,0,1)< previousLow) { // Buy condition: Previous M15 high taken out if(iHigh(symb,0,0)> previousHigh) { // Implement your entry logic here // For example, enter a long trade at the fair-value gap double stopLossLevel = fairValueGap -10*SymbolInfoDouble(symb, SYMBOL_POINT); } // Sell condition: Previous M15 low taken out else if(iLow(symb,0,0)< previousLow) { // Implement your entry logic here // For example, enter a short trade at the fair-value gap stopLossLevel = fairValueGap +10*SymbolInfoDouble(symb, SYMBOL_POINT); int r=OrderSend(NULL,OP_BUY,0.1,Ask,33,stopLossLevel-10*Point(),stopLossLevel+20*_Point,"",0,0,Green); } } } } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ voidOnDeinit(constint reason) { // Print a message when the EA is deinitialized Print("Professional Trader Lab EA deinitialized");
// EA deinitialization logic, if any } //+------------------------------------------------------------------+
Комментарии (2)
из за этого советник не торгует.
немного подправил, переписал в МТ4, но все равно непонятно для чего все это.
35 AM2 Сообщений: 16519 - Андрей
16 chomper Автор Сообщений: 64
Зарегистрируйтесь или авторизуйтесь, чтобы оставить комментарий