Hello,.
So years ago the owner of '{ email address deleted by staff }' e-mail wrote the MetaTrader4 to Neuroshell Trader connector client/server, which worked flawlessly. I tried sending him an e-mail but I think his e-mail got spammed so he had to change it.
Does anyone know how to get in contact with him present day or have any contact? He used to be very active on forex forums a few years ago. Will greatly appreciate any assistance.
So years ago the owner of '{ email address deleted by staff }' e-mail wrote the MetaTrader4 to Neuroshell Trader connector client/server, which worked flawlessly. I tried sending him an e-mail but I think his e-mail got spammed so he had to change it.
Does anyone know how to get in contact with him present day or have any contact? He used to be very active on forex forums a few years ago. Will greatly appreciate any assistance.
Inserted Code
#property copyright "Copyright © 2007, Klot." #property link "{ email address deleted by staff }" #include <stdlib.mqh> #import "MT4NSDTLib.dll" int RealTimeData(string a0, int a1, int a2, double a3, double a4, double a5, double a6, double a7); int CheckTradeSignal(int a0, int& a1[], double& a2[]); #import extern bool EnableAutoTrade = true; extern bool isPrediction = FALSE; extern int ID_Channel = 777; extern int tp = 200; extern int sl = 100; extern double Lots = 0.1; extern int ModeTrailing = -1; extern int TrailingStop = 50; extern bool TrailLoss = FALSE; int g_magic_116; int g_datetime_120 = 0; string gs_empty_124 = "Empty"; bool gi_unused_132 = FALSE; bool gi_unused_136 = FALSE; int gi_140 = 1; int init() { g_magic_116 = ID_Channel; SynhroHistory(); return (0); } int deinit() { Comment(""); return (0); } int start() { int l_error_0; int l_pos_4; int lia_24[5]; double lda_48[1]; if (IsOptimization()) return (0); if (IsTesting() == TRUE && IsVisualMode() == FALSE) return (0); if (!IsTradeAllowed()) { l_error_0 = GetLastError(); Print("Торговля запрещена. ", ErrorDescription(l_error_0)); if (l_error_0 != 146/* TRADE_CONTEXT_BUSY */) return (0); } if (IsDllsAllowed() == FALSE) { Print("Вызов из DLL невозможен. ", ErrorDescription(GetLastError())); return (0); } if (IsLibrariesAllowed() == FALSE) { Print("Библиотечные вызовы запрещены. ", ErrorDescription(GetLastError())); return (0); } string ls_8 = Symbol(); int l_timeframe_16 = Period(); int li_28 = 60; bool li_32 = FALSE; bool li_36 = FALSE; bool li_40 = FALSE; bool li_44 = FALSE; double ld_52 = 0; double ld_60 = 0; ArrayInitialize(lia_24, 0.0); if (IsTesting()) li_28 = 60 * l_timeframe_16; if (TimeCurrent() - g_datetime_120 > li_28) { SynhroHistory(); g_datetime_120 = TimeCurrent(); } if (IsVisualMode()) l_pos_4 = 1; else l_pos_4 = 0; int li_20 = RealTimeData(ls_8, l_timeframe_16, Time[l_pos_4], Open[l_pos_4], Low[l_pos_4], High[l_pos_4], Close[l_pos_4], Volume[l_pos_4]); int li_68 = 0; if (EnableAutoTrade && li_20 != 0) { li_68 = CheckTradeSignal(ID_Channel, lia_24, lda_48); li_32 = lia_24[1]; li_36 = lia_24[2]; li_40 = lia_24[3]; li_44 = lia_24[4]; if (li_68 == -1) { Print("ID Channel = ", ID_Channel, " Ошибка CheckTradeSignal = ", li_68); return (0); } } int li_72 = Check_for_open_poz(); if (lia_24[0] == ID_Channel && li_68 != -1) { RefreshRates(); if (!isPrediction) { ld_52 = 0; if (li_32 == TRUE && li_72 != 1) { if (li_72 == -1) close_order(-1); if (lda_48[0] != 0.0 && Bid - lda_48[0] > MarketInfo(Symbol(), MODE_STOPLEVEL) * Point) ld_52 = lda_48[0]; else { if (lda_48[0] != 0.0 && Bid - lda_48[0] < MarketInfo(Symbol(), MODE_STOPLEVEL) * Point) ld_52 = Bid - (MarketInfo(Symbol(), MODE_STOPLEVEL) + 1.0) * Point; else { if (sl != 0) ld_52 = Bid - sl * Point; else ld_52 = 0; } } if (tp != 0) ld_60 = Ask + tp * Point; else ld_60 = 0; buy_open(ld_52, ld_60); Print("Принят сигнал Open Buy"); gs_empty_124 = "OpenBuy"; } if (li_36 == TRUE && li_40 == FALSE) { if (li_72 == 1) close_order(1); Print("Принят сигнал Close Buy"); gs_empty_124 = "CloseBuy"; } if (li_40 == TRUE && li_72 != -1) { if (li_72 == 1) close_order(1); if (lda_48[0] != 0.0 && lda_48[0] - Ask > MarketInfo(Symbol(), MODE_STOPLEVEL) * Point) ld_52 = lda_48[0]; else { if (lda_48[0] != 0.0 && lda_48[0] - Ask < MarketInfo(Symbol(), MODE_STOPLEVEL) * Point) ld_52 = Ask + (MarketInfo(Symbol(), MODE_STOPLEVEL) + 1.0) * Point; else { if (sl != 0) ld_52 = Ask + sl * Point; else ld_52 = 0; } } if (tp != 0) ld_60 = Bid - tp * Point; else ld_60 = 0; sell_open(ld_52, ld_60); Print("Принят сигнал Open Sell"); gs_empty_124 = "OpenSell"; } if (li_44 == TRUE && li_32 == FALSE) { if (li_72 == -1) close_order(-1); Print("Принят сигнал Close Sell"); gs_empty_124 = "CloseSell"; } } else { if (li_32 == TRUE && li_44 == TRUE && li_36 == FALSE && li_40 == FALSE && li_72 != 1) { if (li_72 == -1) close_order(-1); buy_open(0, 0); gs_empty_124 = "OpenBuy"; Print("Принят сигнал Open Buy"); } if (li_36 == TRUE && li_40 == FALSE) { if (li_72 == 1) close_order(1); gs_empty_124 = "CloseBuy"; Print("Принят сигнал Close Buy"); } if (li_40 == TRUE && li_36 == TRUE && li_44 == FALSE && li_32 == FALSE && li_72 != -1) { if (li_72 == 1) close_order(1); sell_open(0, 0); gs_empty_124 = "OpenSell"; Print("Принят сигнал Open Sell"); } if (li_44 == TRUE && li_32 == FALSE) { if (li_72 == -1) close_order(-1); gs_empty_124 = "CloseSell"; Print("Принят сигнал Close Sell"); } } } if (li_72 != 0 && ModeTrailing != -1) { for (l_pos_4 = 0; l_pos_4 < OrdersTotal(); l_pos_4++) { if (!(OrderSelect(l_pos_4, SELECT_BY_POS, MODE_TRADES))) break; if (OrderMagicNumber() != g_magic_116 || OrderSymbol() != Symbol()) continue; if (OrderType() == OP_BUY || OrderType() == OP_SELL) { if (ModeTrailing == 3) { if (OrderType() == OP_BUY && lda_48[0] != 0.0) { if (Bid - lda_48[0] > (MarketInfo(Symbol(), MODE_STOPLEVEL) + 1.0) * Point) if (lda_48[0] - OrderStopLoss() > Point) OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(lda_48[0], Digits), OrderTakeProfit(), 0, Green); } if (OrderType() == OP_SELL && lda_48[0] != 0.0) { if (lda_48[0] - Ask > (MarketInfo(Symbol(), MODE_STOPLEVEL) + 1.0) * Point) if (OrderStopLoss() - lda_48[0] > Point || OrderStopLoss() == 0.0) OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(lda_48[0], Digits), OrderTakeProfit(), 0, Fuchsia); } } if (ModeTrailing == 0) { if (OrderType() == OP_BUY && TrailingStop > 0) { if (Bid - OrderOpenPrice() > Point * TrailingStop) if (OrderStopLoss() < Bid - Point * (TrailingStop + 1)) OrderModify(OrderTicket(), OrderOpenPrice(), Bid - Point * TrailingStop, OrderTakeProfit(), 0, Green); } if (OrderType() == OP_SELL && TrailingStop > 0) { if (OrderOpenPrice() - Ask > Point * TrailingStop) if (OrderStopLoss() > Ask + Point * (TrailingStop + 1) || OrderStopLoss() == 0.0) OrderModify(OrderTicket(), OrderOpenPrice(), Ask + Point * TrailingStop, OrderTakeProfit(), 0, Red); } } if (ModeTrailing == 1) TrailingByFractals(OrderTicket(), l_timeframe_16, 5, TrailingStop, TrailLoss); if (ModeTrailing == 2) TrailingByShadows(OrderTicket(), l_timeframe_16, 3, TrailingStop, TrailLoss); } } } string ls_76 = ""; if (li_20 != 0) ls_76 = "Передача тиков в чарт " + Symbol() + Period() + " утановлена "; else ls_76 = "В NSDT не открыт чарт " + Symbol() + Period(); Comment("---------- DataFeed NSDT -----------------", "\n", ls_76, "\n", "---------- Auto Trade --------------------", "\n", " Enable = ", EnableAutoTrade, " ID Channel = ", lia_24[0], "\n", "---------- Current Trade Signal ----------", "\n", " Last Signal = ", gs_empty_124, "\n", " Buy = ", lia_24[1], " Close Buy = ", lia_24[2], "\n", " Sell = ", lia_24[3], " Close Sell = ", lia_24[4], "\n", " Stop Level = ", lda_48[0]); return (0); } void buy_open(double a_price_0, double a_price_8) { int l_ticket_16; int l_error_20, i; double ld_24 = (MarketInfo(Symbol(), MODE_STOPLEVEL) + 1.0) * Point; MathSrand(TimeLocal()); for ( i = 0; i < 6; i++ ) { if (!IsTradeAllowed()) { l_error_20 = GetLastError(); if (l_error_20 == 146/* TRADE_CONTEXT_BUSY */) { Print("Error opening BUY order : ", "Торговый поток занят. Ждем..."); Sleep(MathRand() + 1000); } else { Print("Торговля запрещена ", ErrorDescription(l_error_20)); return; } } RefreshRates(); if (a_price_0 != 0.0 && Bid - a_price_0 < ld_24) { Print("Error opening BUY order : ", "Слишком близкий CЛ"); return; } if (a_price_8 != 0.0 && a_price_8 - Ask < ld_24) { Print("Error opening BUY order : ", "Слишком близкий ТП"); return; } l_ticket_16 = OrderSend( Symbol(), OP_BUY, Lots, NormalizeDouble( MarketInfo( Symbol(), MODE_ASK ), Digits ), 5, 0, 0, 0, g_magic_116, 0, Aqua ); if ( l_ticket_16 > 0 ) { if (!(OrderSelect(l_ticket_16, SELECT_BY_TICKET, MODE_TRADES))) continue; Print( "BUY order opened : ", OrderOpenPrice() ); break; } // if Print("Error opening BUY order : ", ErrorDescription(GetLastError()), " Попытка № ", i); Sleep(MathRand() % 1000 + 1000); } // for if ( l_ticket_16 > 0 && OrderSelect(l_ticket_16, SELECT_BY_TICKET, MODE_TRADES)) { for ( i = 0; i < 6; i++) { if ( OrderModify( l_ticket_16, OrderOpenPrice(), NormalizeDouble( a_price_0, Digits ), NormalizeDouble( a_price_8, Digits ), 0, Aqua ) == true ) { Print( "BUY order modified: ", OrderOpenPrice() ); return; } // if Print("Error modifying BUY order : ", ErrorDescription(GetLastError()), " Попытка № ", i); Sleep(MathRand() % 1000 + 1000); } // for } // if } // buy_open