bool indBuy=false;
bool indSell=false;
double sigBuy = iCustom(NULL,0,"SuperTrend",10,3,0,0);
double sigSell = iCustom(NULL,0,"SuperTrend",10,3,1,0);
if (sigBuy != EMPTY_VALUE) indBuy=true;
if (sigSell != EMPTY_VALUE) indSell=true;
if (indBuy==true)
{
// place a buy order
}
if (indSell==true)
{
// place a sell order
}
Hope it helps.
======================
===============================
No comments:
Post a Comment