Boys, why do you think this code doesn't work?
HTML:
Pos = 0;
EntryPrice = 0;
Buy = C < WMA( C, 300 ) ;
Sell = C >= WMA( C, 300 );//
for ( i = 0; i < BarCount; i++ )
{
if ( Buy[i] AND Pos==0)
{
EntryPrice = BuyPrice[i];
pos == 1; // position became greater than 0. stop buy at this point. but the system continues to buy. what is wrong?
}
else if (pos == 1)
{
Buy[i] = 0;
}
}