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
This line:
should be:
But in fact this entire line is not necessary.
And instead of:
You could have:
So that your:
could be simplified into:
This line:
should be:
But in fact this entire line is not necessary.
And instead of:
You could have:
So that your:
could be simplified into:
Well, i put it in a cycle to draw many lines and it didnt work...whats going on with this...same code, i see nothing wrong with the code but seems the ibarshift condition doesnt meets if i draw so many lines but if drawing one line it does meet...
Well, i put it in a cycle to draw many lines and it didnt work...whats going on with this...same code, i see nothing wrong with the code but seems the ibarshift condition doesnt meets if i draw so many lines but if drawing one line it does meet...
I suppose you added an outer loop for 'a'? You'll need to consider these:
(1) Since you're using 'a' to name your lines, then basically all your lines will move and change not only time2, but time1, price1 and price2 as well, as new bars are formed. If you don't want your lines to move, then consider adding time to the name of your lines.
(2) ObjectCreate() - should check if the lines already exist, and call ObjectSetInteger()/ObjectSetDouble() if necessary (i.e. if you don't add time into names).
(3) Loop for 'c' should best be reversed and a break put right after you change time2, for efficiency reason.
Show your latest code if you need more concrete advice.
I suppose you added an outer loop for 'a'? You'll need to consider these:
(1) Since you're using 'a' to name your lines, then basically all your lines will move and change not only time2, but time1, price1 and price2 as well, as new bars are formed. If you don't want your lines to move, then consider adding time to the name of your lines.
(2) ObjectCreate() - should check if the lines already exist, and call ObjectSetInteger()/ObjectSetDouble() if necessary (i.e. if you don't add time into names).
(3) Loop for 'c' should best be reversed and a break put right after you change time2, for efficiency reason.
Show your latest code if you need more concrete advice.
I svck xD
I svck xD
Based on your code, move your 'd' loop into 'a' loop (by shifting the last '}' before 'd' loop to after 'd' loop, and remove repeat declaration of 'b'. Then loop your 'd' to <'a'. You'll get:
I must say it is very inefficient. Look at my earlier comments and put in more effort, if you really want to learn.
Based on your code, move your 'd' loop into 'a' loop (by shifting the last '}' before 'd' loop to after 'd' loop, and remove repeat declaration of 'b'. Then loop your 'd' to <'a'. You'll get:
I must say it is very inefficient. Look at my earlier comments and put in more effort, if you really want to learn.
Can you please post the code from that image? i did what you say but didnt get the same results it freezes...im trying guess im silly xD
Can you please post the code from that image? i did what you say but didnt get the same results it freezes...im trying guess im silly xD
Should be this one:
Should be this one:
ty, i see if the amount of bars for the first cycle is changed then it works but if i use all bars it wont work, why do it works using an x amount of bars but it wont work if i use Bars or all bars?
ty, i see if the amount of bars for the first cycle is changed then it works but if i use all bars it wont work, why do it works using an x amount of bars but it wont work if i use Bars or all bars?
Will work, just takes veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrry long for slower pcs (after all your code is inefficient)... and it'll completely fill up your chart window with lines.
I svck xD
Could you please write correct English...
What that means ?