Express E_BigWhite // Author Eric Lefort for MOGALEF Vars input $StartTime(0,2359,0),$EndTime(0,2359,2359),$MessageBox(0,1,0),$PlaySound(0,1,0),$SendEmail(0,1,0); input $Long1_Short2(1,2,1); //input $Coef(6,12,8); input $DifferEntry(0,10,0); input $light(0,1,1); series INDIC,tr,AVTR,Corps; series Pose; series senti; numeric i; Calculation CalculateAtEveryTick(false); // Calcul de l'ATR if IsFirstBar() then begin for i = 0 to FinalBarIndex() begin if ( (h[-i]-l[-i])>absvalue(c[1-i]-l[-i]) ) then if (h[-i]-l[-i])>absvalue(h[-i]-c[1-i]) then tr[-i]=(h[-i]-l[-i]); else tr[-i]=absvalue(h[-i]-c[1-i]); else if absvalue(c[-i+1]-l[-i])>absvalue(h[-i]-c[-i+1]) then tr[-i]=absvalue(c[1-i]-l[-i]); else tr[-i]=absvalue(h[-i]-c[1-i]); if close[1-i] = void then avtr[-i] = h[-i]-l[-i]; else avtr[-i]=((tr[-i]-avtr[1-i])/30) + avtr[1-i]; Corps[-i]=c[-i]-o[-i]; eND end // Fin de calcul de l'ATR //if (date<31_12_2015) then begin // BIG WHITE If (Corps) > (0.8*AVTR) then begin If ($Long1_Short2 =1)then begin INDIC=1; if $Light = 1 then highlight("slot","green"); end Else begin INDIC=-1; if $Light = 1 then highlight("slot","red"); end end //end if (INDIC[$DifferEntry]>0) then pose=1; if (INDIC[$DifferEntry]<0) then pose=-1; senti=50; if (TimeToNumeric(timeopen) >= $StartTime) and (TimeToNumeric(timeopen) <= $EndTime) then begin If (Pose=1) and (IsBarCompleted()) then begin Senti=100; if ($SendEmail = 1) then SendEmail("Buy signal","Buy signal: Big White " + SymbolName()); if ($PlaySound = 1) then Playsound("ring"); if ($MessageBox = 1) then MessageBox("Buy signal: Big White " + SymbolName()); end else begin If (Pose=-1) and (IsBarCompleted()) then begin Senti=0; if ($SendEmail = 1) then SendEmail("Sell signal","Sell signal: Big White " + SymbolName()); if ($PlaySound = 1) then Playsound("ring"); if ($MessageBox = 1) then MessageBox("Sell signal: Big White " + SymbolName()); end end end interpretation begin sentiment=senti; end //plot (AVTR,black,1); //plot (Corps,black,2);//@@@cs:824058-3732648-651138_cs@@@