Скачать MetaTrader 5

Баг с iCustom() v тестере

Авторизуйтесь или зарегистрируйтесь, чтобы добавить комментарий
Forex Trader
114280
Forex Trader  
Привет

Както получается у меня неисправна проблема с тестером и кастом индикатороми(билд 195) -

20:02:21 WolfeWavesFollower: loaded successfully
20:03:07 WolfeWavesFollower inputs: TakeProfit=300; StopLoss=100; Lots=0.1; TrailingStop=35; HighLowPeriod=350; Shift=0; NoisePipsFactor=0.61803; Alerts=0; EntryPips=30; Trades=1; MinTakeProfit=150; MinStopLoss=50; BidStopPoints=70; DelayedBidsTimeout=36000; ParabolicSarStep=0.0015; ParabolicSarMax=0.01; ArrowSize=1; 
20:03:07 WolfeWavesFollower EURUSD,M30: EURUSD Elliot Waves - Wolfe Mod(Trace 350 Bars for Highest/Lowest Prices) Follower v1.0 loaded.
20:03:07 1999.11.19 16:00  WolfeWaves_test EURUSD,M30: loaded successfully
20:03:07 1999.11.19 16:00  WolfeWaves_test EURUSD,M30: EURUSD Elliot Waves - Wolfe Mod(Trace 350 Bars for Highest/Lowest Prices) indicator 2005-2006 v2.0 loaded.
20:03:07 1999.11.19 16:00  WolfeWaves_test EURUSD,M30: EURUSD HighLowPeriod=350 Shift=0 NoisePipsFactor=0.618 Alerts=1 EntryPips=0 ShowHistory=1 ArrowSize=1 Arrows=1
20:03:07 1999.11.19 16:30  WolfeWaves_test EURUSD,M30: loaded successfully
20:03:07 1999.11.19 16:30  WolfeWaves_test EURUSD,M30: EURUSD Elliot Waves - Wolfe Mod(Trace 350 Bars for Highest/Lowest Prices) indicator 2005-2006 v2.0 loaded.
20:03:07 1999.11.19 16:30  WolfeWaves_test EURUSD,M30: EURUSD HighLowPeriod=350 Shift=0 NoisePipsFactor=0.618 Alerts=1 EntryPips=0 ShowHistory=1 ArrowSize=1 Arrows=1
20:03:07 1999.11.19 17:00  WolfeWaves_test EURUSD,M30: loaded successfully
20:03:07 1999.11.19 17:00  WolfeWaves_test EURUSD,M30: EURUSD Elliot Waves - Wolfe Mod(Trace 350 Bars for Highest/Lowest Prices) indicator 2005-2006 v2.0 loaded.
20:03:07 1999.11.19 17:00  WolfeWaves_test EURUSD,M30: EURUSD HighLowPeriod=350 Shift=0 NoisePipsFactor=0.618 Alerts=1 EntryPips=0 ShowHistory=1 ArrowSize=1 Arrows=1
20:03:07 1999.11.19 17:30  WolfeWaves_test EURUSD,M30: loaded successfully
20:03:07 1999.11.19 17:30  WolfeWaves_test EURUSD,M30: EURUSD Elliot Waves - Wolfe Mod(Trace 350 Bars for Highest/Lowest Prices) indicator 2005-2006 v2.0 loaded.
20:03:07 1999.11.19 17:30  WolfeWaves_test EURUSD,M30: EURUSD HighLowPeriod=350 Shift=0 NoisePipsFactor=0.618 Alerts=1 EntryPips=0 ShowHistory=1 ArrowSize=1 Arrows=1
20:03:07 1999.11.19 18:00  WolfeWaves_test EURUSD,M30: loaded successfully
20:03:07 1999.11.19 18:00  WolfeWaves_test EURUSD,M30: EURUSD Elliot Waves - Wolfe Mod(Trace 350 Bars for Highest/Lowest Prices) indicator 2005-2006 v2.0 loaded.
20:03:07 1999.11.19 18:00  WolfeWaves_test EURUSD,M30: EURUSD HighLowPeriod=350 Shift=0 NoisePipsFactor=0.618 Alerts=1 EntryPips=0 ShowHistory=1 ArrowSize=1 Arrows=1
20:03:07 1999.11.19 18:30  WolfeWaves_test EURUSD,M30: loaded successfully
20:03:07 1999.11.19 18:30  WolfeWaves_test EURUSD,M30: EURUSD Elliot Waves - Wolfe Mod(Trace 350 Bars for Highest/Lowest Prices) indicator 2005-2006 v2.0 loaded.
20:03:07 1999.11.19 18:30  WolfeWaves_test EURUSD,M30: EURUSD HighLowPeriod=350 Shift=0 NoisePipsFactor=0.618 Alerts=1 EntryPips=0 ShowHistory=1 ArrowSize=1 Arrows=1
20:03:07 1999.11.19 19:00  WolfeWaves_test EURUSD,M30: loaded successfully
20:03:07 1999.11.19 19:00  WolfeWaves_test EURUSD,M30: EURUSD Elliot Waves - Wolfe Mod(Trace 350 Bars for Highest/Lowest Prices) indicator 2005-2006 v2.0 loaded.
20:03:07 1999.11.19 19:00  WolfeWaves_test EURUSD,M30: EURUSD HighLowPeriod=350 Shift=0 NoisePipsFactor=0.618 Alerts=1 EntryPips=0 ShowHistory=1 ArrowSize=1 Arrows=1
20:03:07 1999.11.19 19:30  WolfeWaves_test EURUSD,M30: loaded successfully



И так во всо времиа тестирования...

Ехперт вызовает через iCustom мой индикатор 1 раз на запуск експерта и тот сразу после первово запуска делает return():

//+------------------------------------------------------------------+
//|                                                   BADiCustom.mq4 |
//|        Copyright © 2005, Arunas Pranckevicius(T-1000), Lithuania |
//|                                      irc://irc.omnitel.net/forex |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, Arunas Pranckevicius(T-1000), Lithuania"
#property link      "irc://irc.omnitel.net/forex"

extern double StopLoss = 100;
extern double Lots = 0.1;
extern double TrailingStop = 35;
extern int HighLowPeriod=350;
extern int Shift=0;
extern double NoisePipsFactor=0.61803;
extern int Alerts=0;
extern double EntryPips=30;
extern int Trades=1;
extern double MinTakeProfit=150;
extern double MinStopLoss=50;
extern double BidStopPoints=70;
extern int DelayedBidsTimeout=36000;
extern double ParabolicSarStep=0.0015;
extern double ParabolicSarMax=0.01;
double Slippage=0;
extern bool Arrows=true;
extern int  ArrowSize=1;

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
  //int ind = iCustom(Symbol(),Period(),"CustomIndicator",0,0);
  int ind;
  ind=iCustom(Symbol(),0,"badind",HighLowPeriod,Shift,NoisePipsFactor,false,20,false,1,true,0);
//----
   return(0);
  }
//+------------------------------------------------------------------+



Фрагмент кода индикатора где всо исполняется:

#property copyright "v2.0 Copyright © 2005-2006, Arunas Pranckevicius(T-1000), Lithuania"
#property link      "irc://irc.omnitel.net/forex"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//---- input parameters
extern int       HighLowPeriod=350;
extern int       Shift=0;
extern double    NoisePipsFactor=0.38197;
extern double    TrendFactor=0.38197;
extern bool      Alerts=false;
extern double    EntryPips=10.0;
extern bool      ShowHistory=true;
extern int       ArrowSize=1;
extern bool      Arrows=true;
//---- buffers
int init=0;

int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_ARROW,DRAW_ARROW,ArrowSize,Blue);
   SetIndexArrow(0,246);
   SetIndexBuffer(0,UpTrend);
   SetIndexEmptyValue(0,0.0);
   SetIndexStyle(1,DRAW_ARROW,DRAW_ARROW,ArrowSize,Red);
   SetIndexArrow(1,248);
   SetIndexBuffer(1,DownTrend);
   SetIndexEmptyValue(1,0.0);
   //double dev=deviance(HighLowPeriod/10,PriceShift);
   //Print("Deviance:", deviance(HighLowPeriod,PriceShift));

if (HighLowPeriod < 2)
{
Print("ERROR: Invalid input parameters, HighLowPeriod() must be 2 or greater, exiting.");
MessageBox("ERROR: Invalid input parameters, HighLowPeriod() must be 2 or greater, exiting.");
return(1);
}
if (init == 0)
{
/*
for counter = PriceShift to HighLowPeriod+1+PriceShift
// Clean all placed own markers in chart
{
DelArrow(Time[counter],High[PriceShift] + NoisePts);
DelArrow(Time[counter],Low[PriceShift] - NoisePts);
}
*/
EntryPts = EntryPips * Point;
IndicatorShortName("EW+WW");
Print(Symbol()," Elliot Waves - Wolfe Mod(Trace ",HighLowPeriod," Bars for Highest/Lowest Prices) indicator 2005-2006 v2.0 loaded.");
Print(Symbol()," HighLowPeriod=",HighLowPeriod," Shift=", Shift," NoisePipsFactor=",NoisePipsFactor," Alerts=",Alerts," EntryPips=",EntryPips," ShowHistory=",ShowHistory," ArrowSize=",ArrowSize," Arrows=",Arrows);
}
//----
   return(0);
  }

int start()
  {      
   if (init == 0)
   {
    init = 1;
    return(1); // Do not allow execution if no init
   } 

   if (IsTesting()) Print("DEBUG: running.");
//----
   return(0);
  }
//+------------------------------------------------------------------+



Помогите наити решение.

P.S> сделал себе транслит -> кирилица писалку чтобы вам легче меня было понятъ, извините за граматические ошыбки ;-]




Forex Trader
114280
Forex Trader  
скорее в индикаторе надо искать. что-то связаное с ShowHistory
Forex Trader
114280
Forex Trader  


expert:
ind=iCustom(Symbol(),0,"badind",HighLowPeriod,Shift,NoisePipsFactor,false,20,false,1,true,0);

indicator:
extern int HighLowPeriod=350;
extern int Shift=0;
extern double NoisePipsFactor=0.38197;
extern double TrendFactor=0.38197;
extern bool Alerts=false;
extern double EntryPips=10.0;

extern bool ShowHistory=true;
extern int ArrowSize=1;
extern bool Arrows=true;



Т.е., опять неправильный порядок передачи аргументов. Помнится, такое у тебя уже было: "Developeram MT4: Problema s iCustom() v experte"
Forex Trader
114280
Forex Trader  
Во спасибо, а то заколебался смотретъ где ошыбка :-D
Авторизуйтесь или зарегистрируйтесь, чтобы добавить комментарий