Improve my strategy
Before posting please read some of the other threads . . . then you would have seen numerous requests like this one:
Please use this to post code . . . it makes it easier to read.

Before posting please read some of the other threads . . . then you would have seen numerous requests like this one:
Please use this to post code . . . it makes it easier to read.

You agree to website policy and terms of use
Hi everyone
Can you help me improve my strtegy ? it consist on EMA and Momentum and also on Bars sequency finishing by hammer(japanese candle formation)
iT WORKS LIKE THAT:
If ema is above ASK and momentum i s getting lower and lower and last four bars are black and moreover the last one is hammer -> OrderSend buy.
Could you tell me the functions for drawing a chart above the price where order is made?
int start()
{
int MagicNumber1=2001,i,closesell=0,closebuy=0;
if(OrdersTotal()>0){
for(i=1; i<=OrdersTotal(); i++) // Cycle searching in orders
{
if (OrderSelect(i-1,SELECT_BY_POS)==true) // If the next is available
{
if(OrderMagicNumber()==MagicNumber1) {int halt1=1;}
}
}
}
//-----------------------
double Ema1=iMA(NULL,0,10,0,MODE_EMA,PRICE_CLOSE,1);
double Ema2=iMA(NULL,0,10,0,MODE_EMA,PRICE_CLOSE,2);
double Ema3=iMA(NULL,0,10,0,MODE_EMA,PRICE_CLOSE,3);
double Ema4=iMA(NULL,0,10,0,MODE_EMA,PRICE_CLOSE,4);
if(Ask<Ema1 && Ask<Ema2 && Ask<Ema3 && Ask<Ema4){
if(iOpen(NULL,0,2)<iClose(NULL,0,2) && (iOpen(NULL,0,2)-iClose(NULL,0,2))>=10*Point ) int BarOneUp=1;
if(iOpen(NULL,0,2)>iClose(NULL,0,2)&& (iOpen(NULL,0,2)>iClose(NULL,0,2))>=10*Point ) int BarOneDown=1;
if(iOpen(NULL,0,3)<iClose(NULL,0,3) && iOpen(NULL,0,3)<iClose(NULL,0,3)>=10*Point) int BarTwoUp=1;
if(iOpen(NULL,0,3)>iClose(NULL,0,3) &&( iOpen(NULL,0,3)>iClose(NULL,0,3))>=10*Point) int BarTwoDown=1;
if(iOpen(NULL,0,4)<iClose(NULL,0,4)&& (iOpen(NULL,0,4)<iClose(NULL,0,4))>=10*Point ) int BarThreeUp=1;
if(iOpen(NULL,0,4)>iClose(NULL,0,4)&& (iOpen(NULL,0,4)>iClose(NULL,0,4))>=10*Point ) int BarThreeDown=1;
if(iOpen(NULL,0,5)<iClose(NULL,0,5) && (iOpen(NULL,0,5)<iClose(NULL,0,5))>=10*Point ) int BarFourUp=1;
if(iOpen(NULL,0,5)>iClose(NULL,0,5) && (iOpen(NULL,0,5)>iClose(NULL,0,5))>=10*Point ) int BarFourDown=1;
double k = (iHigh(NULL,0,0)- iLow(NULL,0,0)) /3 ;
if((iOpen(NULL,0,0) > (iLow(NULL,0,0) +2*k))&& (iClose(NULL,0,0)> (iLow(NULL,0,0) +2*k))) int hammer = 1;
if(BarOneDown==1 && BarTwoDown==1 && BarThreeDown==1 && BarFourDown && hammer==1 ){
double Momentum1=iMomentum(NULL,0,7,PRICE_CLOSE,a);
double Momentum2=iMomentum(NULL,0,7,PRICE_CLOSE,b);
double Momentum3=iMomentum(NULL,0,7,PRICE_CLOSE,c);
double Momentum4=iMomentum(NULL,0,7,PRICE_CLOSE,d);
if(Momentum4 >Momentum3 && Momentum3>Momentum2 && Momentum2>Momentum1){
int transakcja =OrderSend(Symbol(),OP_BUY,2,Ask,6,Ask-SL*Point,Ask+TP*Point,'',MagicNumber1,Green);
}
}
}
return(0);
}