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
Thấu hiểu Hành vi giá Thị trường Tài chính - Understanding Price Action
Là quyển sách hướng dẫn giao dịch Phương Pháp Price Action của Bob Volman, chỉ sử dụng duy nhất một đường MA và cấu trúc thị trường cùng hành vi giá để tìm kiếm lợi nhuận
Bài viết liên quan