Express E_Hammer // 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 $White1_Red2_All3(1,3,3); input $DifferEntry(0,10,0); input $light(0,1,1); series INDIC,INDICB,INDICR; series Pose; series senti; numeric i; Calculation if IsFirstBar() then CalculateAtEveryTick(false); //if (date<31_12_2015) then begin //-------------------------< // Marteau BLANC If ( ((c-o)*4) < (h-l) ) and ((c-o)>=0) and ((o-l)>(3*(h-c))) and (($White1_Red2_All3=1) or ($White1_Red2_All3>2)) then begin If ($Long1_Short2=1)then begin INDIC=1; if $Light = 1 then highlight("slot","lightgreen"); end Else begin INDIC=-1; if $Light = 1 then highlight("slot","lightred"); end end // Marteau ROUGE If ( ((o-c)*4) < (h-l) ) and ((o-c)>=0) and ((c-l)>(3*(h-o))) and ($White1_Red2_All3>1) then begin If ($Long1_Short2=1)then begin INDIC=1; if $Light = 1 then highlight("slot","lightgreen"); end Else begin INDIC=-1; if $Light = 1 then highlight("slot","lightred"); 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: Hammer " + SymbolName()); if ($PlaySound = 1) then Playsound("ring"); if ($MessageBox = 1) then MessageBox("Buy signal: Hammer " + SymbolName()); end else begin If (Pose=-1) and (IsBarCompleted()) then begin Senti=0; if ($SendEmail = 1) then SendEmail("Sell signal","Sell signal: Hammer " + SymbolName()); if ($PlaySound = 1) then Playsound("ring"); if ($MessageBox = 1) then MessageBox("Sell signal: Hammer " + SymbolName()); end end end interpretation begin sentiment=senti; end //plot (senti,black,2);//@@@cs:824021-3724800-651581_cs@@@