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
Trading In The Zone - Thực hành Kiểm soát Cảm xúc bằng Tâm lý học Hành vi trong Đầu tư và Giao dịch Tài chính
Là quyển sách Top 1 toàn cầu về chủ đề đầu tư/trading, Trading In The Zone giúp thấu hiểu và quản trị cảm xúc cũng như giữ vững kỷ luật khi tham gia thị trường tài chính, nhằm nâng cao trình độ và hiệu quả đầu tư lên mức cao nhất có thể
Bài viết liên quan