# Hedge Hammer

One person’s risk off is another one’s risk on.

It is the fist go at isolating the Hedge condition for an auto hedger.

You know, I may be working, offline or sleeping or mere 5 months away from a bank clerk being able to remove a temporary block that nobody asked for from my credit card.

It is amazing how many things I have already coded, finding treasurus on every shelf.

Old code, so I went with the old lingo. NULL and DoubleToStr(i) instead of IntegeToString(i), just out of nostalgia.

``````    if (Close[i]>iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i) && Close[i+1]<iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i+1)+130*Point && Close[i+1]>iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i+1) && Close[i+2]<iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i+2) && Close[i+3]<iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i+3) && Close[i+4]<iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i+4) && iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i) >iMA(NULL,0,32,0,MODE_EMA, PRICE_MEDIAN,i)+80*Point && stoch60[i]>65 && iMA(NULL,0,89,0,MODE_EMA, PRICE_MEDIAN,i+4) > iMA(NULL,0,207,0,MODE_EMA, PRICE_MEDIAN,i+4) ){
ObjectCreate("Titee"+DoubleToStr(i), OBJ_TEXT, 0, Time[i+1], Close[i]+120*Point);
ObjectSetText("Titee"+DoubleToStr(i), "H", 42, "Arial Black", Green);
}

if (Close[i]<iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i) && Close[i+1]>iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i+1)-130*Point && Close[i+1]<iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i+1) && Close[i+2]>iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i+2) && Close[i+3]>iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i+3) && Close[i+4]>iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i+4) && Close[i+5]>iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i+5) && iMA(NULL,0,8,0,MODE_EMA, PRICE_OPEN,i) <iMA(NULL,0,32,0,MODE_EMA, PRICE_MEDIAN,i)-50*Point && stoch60[i+1]<30 && stoch60[i]>20 && iMA(NULL,0,89,0,MODE_EMA, PRICE_MEDIAN,i+4) < iMA(NULL,0,207,0,MODE_EMA, PRICE_MEDIAN,i+4)){
ObjectCreate("Titee"+DoubleToStr(i), OBJ_TEXT, 0, Time[i+1], Close[i]+50*Point);
ObjectSetText("Titee"+DoubleToStr(i), "H", 42, "Arial Black", Crimson);
}``````

I know you just love this background color. I’ve gotta think hard about a good definition for the end game. Courting the 30-sample 4-hour seems a bit lousy and lewd and the 8EMO closes can be reversed – see this very page.