Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 1004
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello! In Expert Advisor, as one of the trading conditions, I use CCI pivot, but for some reason it does not work. Could you please explain what is the error?
C_1=iCCI(NULL,0,C_period,PRICE_TYPICAL,0);
C_2=iCCI(NULL,0,C_period,PRICE_TYPICAL,1);
C_3=iCCI(NULL,0,C_period,PRICE_TYPICAL,2);
if(C_1 > C_2 > C_3)Opn_B=true;
if(C_1 < C_2 < C_3)Cls_B=true;
Hello! In Expert Advisor, as one of the trading conditions, I use CCI pivot, but for some reason it does not work. Could you please explain what is the error?
C_1=iCCI(NULL,0,C_period,PRICE_TYPICAL,0);
C_2=iCCI(NULL,0,C_period,PRICE_TYPICAL,1);
C_3=iCCI(NULL,0,C_period,PRICE_TYPICAL,2);
if(C_1 > C_2 > C_3)Opn_B=true;
if(C_1 < C_2 < C_3)Cls_B=true;
if(C_1 < C_2 && C_2 < C_3)Cls_B=true;
if (C_1 > C_2 && C_2 > C_3) Opn_B=true;
if (C_1 < C_2 && C_2 < C_3) Cls_B=true;
Can you please tell me what is wrong here? I want trades to close when they cross 70 downwards (Buy) and 30 upwards (Sell). For some reason trades are closing Buy well below 70 and Sell well above 30. RSI does not even make it to 70 and 30 yet. Thanks!
R_1=iRSI(NULL,0,RSI_Period,PRICE_TYPICAL,0);
R_2=iRSI(NULL,0,RSI_Period,PRICE_TYPICAL,1);
if((R_1 < 70 && R_2 > 70)) Cls_B=true;Can you please tell me what is wrong here? I want trades to close when they cross 70 downwards (Buy) and 30 upwards (Sell). For some reason trades are closing Buy well below 70 and Sell well above 30. RSI does not even make it to 70 and 30 yet. Thanks!
R_1=iRSI(NULL,0,RSI_Period,PRICE_TYPICAL,0);
R_2=iRSI(NULL,0,RSI_Period,PRICE_TYPICAL,1);
if((R_1 < 70 && R_2 > 70)) Cls_B=true;In the previous post, you had: if(C_1 < C_2 && C_2 < C_3) Cls_B=true; Now you have the same variable changing under a different condition: if((R_1 < 70 && R_2 > 70)) Cls_B=true; Check.
Try this code:
Hello all!!!!
I am sure that has been done repeatedly like this, but maybe someone will suggest a formula for the size of the lot, depending on the funds???
Like if more than 2000 then lot 0.02, if more than 3000 then 0.03, etc.?
Hello all!!!!
I am sure that has been done repeatedly like this, but maybe someone will suggest a formula for the size of the lot, depending on the funds???
Like if more than 2000 then lot 0.02, if more than 3000 then 0.03, etc.?
In the previous post you had: if (C_1 < C_2 && C_2 < C_3) Cls_B=true; Now you have the same variable changing under a different condition: if((R_1 < 70 && R_2 > 70)) Cls_B=true; Check it.
Try this code:
Thank you very much for your help! I am figuring out how exactly the RSI EA works. So what is interesting, in the following chart trades are opened in exactly the right place, but they are closed completely in the wrong place (I want trades to be closed at 70 crossing from top to bottom (Buy) and 30 crossing from bottom to top (Sell). Your recommended closing scheme does not work either. I set the RSI period to 2 and am looking at M1. Where is the inaccuracy, I can't figure it out.
R_1=iRSI(NULL,PERIOD_CURRENT,RSI_Period,PRICE_TYPICAL,0);
R_2=iRSI(NULL,PERIOD_CURRENT,RSI_Period,PRICE_TYPICAL,1);
if(R_1>60 && R_2<60) Opn_B=true;
if(R_1<40 && R_2>40) Opn__S=true;
if(R_1<70.0 && R_2>70.0) Cls_B=true;
if(R_1<30.0 && R_2<30.0) Cls_S=true;
Thank you very much for your help! I am in the process of figuring out how the RSI EA works. So what's interesting, on the chart below, trades open exactly where they should, but they close completely wrong (I want trades to close at 70 crossing from top to bottom (Buy), and 30 crossing from bottom to top (Sell). Your recommended closing scheme does not work either. I set the RSI period to 2 and am looking at M1. Where is the inaccuracy, I can't figure it out.
R_1=iRSI(NULL,PERIOD_CURRENT,RSI_Period,PRICE_TYPICAL,0);
R_2=iRSI(NULL,PERIOD_CURRENT,RSI_Period,PRICE_TYPICAL,1);
if(R_1>60 && R_2<60) Opn_B=true;
if(R_1<40 && R_2>40) Opn__S=true;
if(R_1<70.0 && R_2>70.0) Cls_B=true;
if(R_1<30.0 && R_2<30.0) Cls_S=true;
Are you sure that the last condition is spelled correctly?