Hello,
Good evening.
Hope to find all of you well.
I was looking for a solution for this problem.
I wanted to program a screener that searched for stocks whose current price is 0.85*price(30 days before).
If I put the number, the screener works. But I would like to put a variable instead of a number, so I can change it quickly.
Something like this (but this solution is not working: if I put the decimal number, it works; if I put a variable and the same decimal number in the variable it doesn’t work):
c1 = (close < dd*close[nod])
Variables:
dd = 0.85
nod=20
Can anyone help or explain to me, please, how can I solve this problem? I’ve already tried to find her something similar just to see how it worked on programming, but still didn’t find anything.
Thank you very much for your care and attention. Very grateful for all the aid I hope to find here.
My best regards to all of you.
Just a little correction, my apologies:
To be coherent with the given example description, the variables for the example would be :
dd=0.85
nod=30 (not 20, as written before)
Thank you very much.
Please:
- use quoting only when necessary
- do not quote yourself
- Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.
Quoting is a nice feature if used correctly, otherwise it makes topics unnecessarily long and difficult to read.
I moved your topic from the French to the English forum.
Thank you 🙂
Parameters are too strict, use:
dd = 0.95
nod = 300
and it’ll work.
15% over 30 periods is quite impossible (on Dax it’s about 2300 pips, it might work on a Weekly chart!).
Test it on FX pairs, as indices are more likely to be in an uptrend.