Hi, how do I store and get the value of high and open price of previous closed candle since the value will keep changing on every previous closed candle? The idea is to get the High & open from a certain condition when the condition true store the value of Open and High. Technical term called as a pullback area.
double high=0,open=0,
AskPrice=MarketInfo(OrderSymbol(),MODE_ASK),
BidPrice=MarketInfo(OrderSymbol(),MODE_BID);
bool sellcondition = Open[1] > Close[1] && High[1] > Open[1] && Close[1] > Low[1];
if( sellcondition )
{
open=Open[1];
high=High[1];
}
if(Bid > open && Bid < high)
{
OrderSend(Symbol(),OP_SELL,0.01,BidPrice,3,0, 0,"",0,0,clrRed);
}
