Hi Averied,
Alrighty, day 1 demo tested. Not so great, i want to reverse the code now and enter to same direction versus opposite, Ive tried to edit the code myself but it will not work; please see below, can you see what I am doing wrong here?
if (Close[i] < Open[i])
{
cbarsbear++;
beartxt = "Consecutive bearish: " + DoubleToStr(cbarsbear,0);
ObjectSetText(“txtcbear”,beartxt,9, “Verdana”, Red);
}
else
{
cbarsbear = 0;
beartxt = "Consecutive bearish: " + DoubleToStr(cbarsbear,0);
ObjectSetText(“txtcbear”,beartxt,9, “Verdana”, Red);
}
if (Close[i] > Open[i])
{
cbarsbull++;
bulltxt = "Consecutive bullish: " + DoubleToStr(cbarsbull,0);
ObjectSetText(“txtcbull”,bulltxt,9, “Verdana”, Green);
}
else
{
cbarsbull = 0;
bulltxt = "Consecutive bullish: " + DoubleToStr(cbarsbull,0);
ObjectSetText(“txtcbull”,bulltxt,9, “Verdana”, Green);
}
}
if (cbarsbear == candlesticks)
{
OrderSend(Symbol(),OP_SELL,Lots,Ask,3,Ask-SLpipsPoint,Ask+TPpipsPoint,“4candlesticks”,16384,0,Green);
}
if (cbarsbull == candlesticks)
{
OrderSend(Symbol(),OP_BUY,Lots,Bid,3,Bid+SLpipsPoint,Bid-TPpipsPoint,“4candlesticks”,16384,0,Red);
}
}
return(0);
}
void delay(int speed)
{
if(IsVisualMode()==true)
{
int Waitloop = 0;
while(Waitloop < speed)
{
//Comment("Wait Loop Count = ", Waitloop);
Waitloop ++;
}
}
}
Also had one other idea, is it possible to write a code that would identify a single candle that closes above a certain number of pips? For example, code an entry for a candlestick that closes say over 60 pips, if a bull candle closes above 60 pips place a buy entry OR if a single candle hits 50 pip movement an entry is placed for 10 Pip profit going the same direction.
What do you think?
thank you