Using a number (decimal ou integer) to multiply for the value of an indicator

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #170288 quote
    MigVi
    Participant
    New

    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.

    #170289 quote
    MigVi
    Participant
    New
    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.

    #170291 quote
    robertogozzi
    Moderator
    Master

    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 🙂

    #170292 quote
    robertogozzi
    Moderator
    Master

    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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Using a number (decimal ou integer) to multiply for the value of an indicator


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
MigVi @migvi Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by robertogozzi
4 years, 9 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 05/25/2021
Status: Active
Attachments: No files
Logo Logo
Loading...