
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
Here is my code, so far, but it does contain the problem that I am experiencing.
Here is the problem:
The calculator is supposed to work by temporarily shifting to a D1 chart, then retain the calculated values regardless of the chart time-frame.
If I leave in the line:
if(Period()!=1440) return(0);
the calculator works properly when on a D1 time-frame, however the values are no longer displayed in other time-frames. If I remove that line, the calculator works, but calculates based on the last candle in the particular time-frame - which is, of course, incorrect. I need it to retain the value from the calculation performed in the D1 chart.
I can only guess that there is something different that needs to be done with the 'return(0)' portion, but looking at the few other programming examples gives no clue, nor can I seem to find anythin in the programming reference dictionary.
Thanks for any help.
G'Jim c):{-