(or anyone else that knows the answer...)
I noted that the deinit() function got called in the init() function.
Am I missing something here? or is this a typo? Is there some diabolical bug, or advantage in MT4 that requires deinit() to be called in the init() function? See the line just before the return value.
I hadn't seen this before...
Thanks
Code: Select all
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,myWingDing);
SetIndexBuffer(0,DynR);
SetIndexEmptyValue(0,0.0);
SetIndexStyle(1,DRAW_ARROW);
SetIndexArrow(1,myWingDing);
SetIndexBuffer(1,DynS);
SetIndexEmptyValue(1,0.0);
SetIndexStyle(2,DRAW_ARROW);
SetIndexArrow(2,myWingDing);
SetIndexBuffer(2,LgTrig);
SetIndexEmptyValue(2,0.0);
SetIndexStyle(3,DRAW_ARROW);
SetIndexArrow(3,myWingDing);
SetIndexBuffer(3,ShTrig);
SetIndexEmptyValue(3,0.0);
SetIndexStyle(4,DRAW_ARROW);
SetIndexArrow(4,myWingDing);
SetIndexBuffer(4,BOTarget);
SetIndexEmptyValue(4,0.0);
period = Period();
tChartPeriod = TimeFrameToString(period) ;
symbol = Symbol() ;
digits = Digits ;
Trigger = Time[0] ;
point = Point ;
if(digits == 5 || digits == 3) { digits = digits - 1 ; point = point * 10 ; }
xThreshold = iThreshold * point ;
PipsTrigger = iPipsTrigger * point ;
ShortName = TAG+symbol+iPeriods ;
if( myCorner == 0 || myCorner == 2 )
{
x001 = 0 ;
x002 = 0 ;
x003 = 90 ;
x004 = 150;
x005 = 100 ;
x006 = 10 ;
x007 = 0 ;
FillAmt = 20 ;
}
else
{
x001 = 0 ;
x002 = 10 ; //
x003 = 60 ; // val
x004 = 0 ; // dif
x005 = 0 ;
x006 = 10 ;
x007 = 220 ; // arrow
FillAmt = 23 ;
}
BreakOutPips = iBreakOutPips * point ;
deinit() ;
return(0);
}
Thanks
ooops TRO Rat Zone not sweetspot.