scfx: But I really want to apply the below approach.
up_1(i)=up_0(i+1)
Could you please tell me how to do that?if ( High[i] > High[i+1] ) {up_0[i]=1;} //if ( High[i+1] > High[i+2] ) {up_1[i]=1;} up_1[i]=up_0[i+1]; // What's the problem?
WHRoeder:
Thank you for your reply, I cannot make up_0[i] but just up_0, so that second row is not workingif ( High[i] > High[i+1] ) {up_0=1;} //if ( High[i+1] > High[i+2] ) {up_1[i]=1;} up_1[i]=up_0[i+1]; //In this case, I cannot make up_0[i] but just up_0, so that second row is not working
scfx: I cannot make up_0[i] but just up_0,
That's not what you original posted. Either you have to have the previous value in an array or you must calculate it with your i+1 i+2
if ( High[i] > High[i+1] ) {up_0[i]=1;}
WHRoeder:
That's not what you original posted. Either you have to have the previous value in an array or you must calculate it with your i+1 i+2
That's not what you original posted. Either you have to have the previous value in an array or you must calculate it with your i+1 i+2
You are right. I don't have it in array and I guess the question is that how can I turn/make it an array.
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,
I want to create variable up_0 and up_1 where up_1 is lag 1 period of up_0.
I can do it like that
But I really want to apply the below approach.
up_1(i)=up_0(i+1)
Could you please tell me how to do that?
Thank you very much.
SCFX