Sao em bachtest hàm for này lên 2000 mà comment vẫn trả về m n là 0 0 vậy
double m =0; double n =0;double bandlow10 =0; double bandhigh10 =0;
double bandhigh11 =0;double bandlow11 =0;double bandhigh12 =0; double bandlow12 =0;
for ( int i =1; i < 20;i++)
{
bandlow10 =iBands(NULL,0,50,2,0,PRICE_LOW,MODE_CLOSE,i);
bandhigh10 = iBands(NULL,0,50,2,0,PRICE_HIGH,MODE_CLOSE,i);
bandlow11 =iBands(NULL,0,50,2,0,PRICE_LOW,MODE_CLOSE,(i+1));
bandhigh11 = iBands(NULL,0,50,2,0,PRICE_HIGH,MODE_CLOSE,(i+1));
bandlow12 =iBands(NULL,0,50,2,0,PRICE_LOW,MODE_CLOSE,(i+2));
bandhigh12 = iBands(NULL,0,50,2,0,PRICE_HIGH,MODE_CLOSE,(i+2));
if (bandlow10 > Close && bandlow11 < Close[(i+1)] && bandlow12 < Close[(i+2)]) {m =m + 1;}
if (bandhigh10 < Close && bandhigh11 > Close[(i+1)] && bandhigh12 > Close[(i+2)]) {n =n +1;}
}
Comment(string(m)+string(n));
double m =0; double n =0;double bandlow10 =0; double bandhigh10 =0;
double bandhigh11 =0;double bandlow11 =0;double bandhigh12 =0; double bandlow12 =0;
for ( int i =1; i < 20;i++)
{
bandlow10 =iBands(NULL,0,50,2,0,PRICE_LOW,MODE_CLOSE,i);
bandhigh10 = iBands(NULL,0,50,2,0,PRICE_HIGH,MODE_CLOSE,i);
bandlow11 =iBands(NULL,0,50,2,0,PRICE_LOW,MODE_CLOSE,(i+1));
bandhigh11 = iBands(NULL,0,50,2,0,PRICE_HIGH,MODE_CLOSE,(i+1));
bandlow12 =iBands(NULL,0,50,2,0,PRICE_LOW,MODE_CLOSE,(i+2));
bandhigh12 = iBands(NULL,0,50,2,0,PRICE_HIGH,MODE_CLOSE,(i+2));
if (bandlow10 > Close && bandlow11 < Close[(i+1)] && bandlow12 < Close[(i+2)]) {m =m + 1;}
if (bandhigh10 < Close && bandhigh11 > Close[(i+1)] && bandhigh12 > Close[(i+2)]) {n =n +1;}
}
Comment(string(m)+string(n));
Giới thiệu sách Trading hay
Giao Dịch Theo Xu Hướng Để Kiếm Sống
Sách chia sẻ chiến lược giao dịch, tâm lý, phương pháp quản lý vốn thực chiến của Trader 18 năm kinh nghiệm giao dịch theo xu hướng
Bài viết liên quan