A simple calculation works in an indicator but not in a screener

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #164645 quote
    marie123marie123
    Participant
    Junior

    Hello again 🙂

    I made a simple calculation which compares the current close price with the EMA 200. If used in an indicator it works 100% correct but the result of the same calculation is always higher in the screener. I have no idea why because it is absolutely the same calculation. What am I doing wrong?

    This is the screener version:

    calc=((close/exponentialaverage[200](close))-1)*100
    SCREENER [calc>0](calc)

    And this is the indicator:

    calc=((close/exponentialaverage[200](close))-1)*100
    return calc

    Help is very appreciated!

    #164652 quote
    NicolasNicolas
    Keymaster
    Legend

    Same usual question about long term EMA in ProScreener 😀

    Unfortunately, the history available in ProScreener (254 bars) is not sufficient to calculate correctly long term EMA, so difference exist between what is calculated with ProBuilder (indicator).

    I recommend using simple moving average instead.

    marie123 thanked this post
    #164693 quote
    marie123marie123
    Participant
    Junior

    Thank you for the clarification. I thought I was too stupid to code correctly… 😄

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

A simple calculation works in an indicator but not in a screener


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
marie123 @marie123 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by marie123marie123
5 years, 6 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 03/19/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...