CurrentBid = GetCurrentAsk();
// Condition set 1
if (CrossAbove(EMA(), SMA(), 1))
{
Distance = (CurrentBid - (System.Convert.ToDouble(EMA(14))));
if(Distance < 1.5)
{
EnterLong(1, "Buy01");
EnterLong(1, "Buy02");
}
}
// Condition set 2
if (CrossBelow(EMA(), SMA(), 1))
{
Distance = ((System.Convert.ToDouble(EMA(14))) - CurrentBid);
if(Distance < 1.5)
{
EnterShort(1, "Sell01");
EnterShort(1, "Sell02");
}
}
Comment