This variable is not used in the code error

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #165064 quote
    cc267
    Participant
    Average

    Everything was working fine on my screeners yesterday but today some are displaying “this variable is not used in the code error” variable being color. I don’t have color written anywhere in the code? Is this a glitch? I dont understand as its not even a variable in the code?

    #165067 quote
    robertogozzi
    Moderator
    Master

    You should post the code to help us check it.

    #165070 quote
    cc267
    Participant
    Average
    indicator1, ignored, ignored, ignored, ignored, ignored, ignored = CALL "MyIndicator(1)"
    indicator2 = macd [12,26,9](close)
    c1 = (indicator1 < indicator2)or (indicator1 > indicator2)
    
    indicator3 = rsi[14](close)
    c2 = (indicator1 < indicator3) or (indicator1 > indicator3)
    
    
    SCREENER[c1 AND c2] ((close/DClose(1)-1)*100 AS "%Chg yest.")
    
    
    #165071 quote
    robertogozzi
    Moderator
    Master

    Without the indicator I cannot replicate the error, I can only suggest you to use:

    = CALL MyIndicator[1]

    with brackets instead of parentheses.

    #165075 quote
    cc267
    Participant
    Average

    That did not work but myindicator1 refers to vwap and this was the code used – https://www.prorealcode.com/prorealtime-indicators/vwap-intraday/

    It has been working fine for weeks but the screeners i have which no longer work all seem to involve vwap?

    #165076 quote
    robertogozzi
    Moderator
    Master

    Try removing both [1]  and (1), since that indicator uses no external variables.

    #165081 quote
    robertogozzi
    Moderator
    Master

    This is working fine:

    indicator1, ignored, ignored, ignored, ignored, ignored, ignored = CALL "PRC_VWAP intraday"
    indicator2 = macd [12,26,9](close)
    c1 = (indicator1 < indicator2)or (indicator1 > indicator2)
    indicator3 = rsi[14](close)
    c2 = (indicator1 < indicator3) or (indicator1 > indicator3)
    SCREENER[c1 AND c2] ((close/DClose(1)-1)*100 AS "%Chg yest.")
    #165089 quote
    Ezmeer
    Participant
    Junior

    I have the same problem.

    CALL function stopped working with my indicators. Only with built-in indicators.

    #165090 quote
    cc267
    Participant
    Average

    Was it with all your own indicators or just some? For me it seems its mostly indicators where I had VWAP, I check my screeners each day and yesterday was fine. Has it just started today for you also?

    #165093 quote
    Ezmeer
    Participant
    Junior

    It started today with some indicators. Not all of them.

    I’m not using VWAP.

    I thing prorealtime programmers changed something in the code, and now there is a problem with CALL function.

    #165094 quote
    cc267
    Participant
    Average

    It started today with some indicators. Not all of them.

    I’m not using VWAP.

    I thing prorealtime programmers changed something in the code, and now there is a problem with CALL function.

    Yeah some of my call functions work and others don’t seem to work anymore and i’m getting syntax errors. Is there other reports of these issues?

    #165097 quote
    Ezmeer
    Participant
    Junior

    It will be great if support team will explain when the meaning of the error “This variable is not used in the code error” and how to solve it.

    #165136 quote
    Nicolas
    Keymaster
    Master

    Sorry for that. In order to replicate the issue and do further investigation, it is necessary to drop here some examples.

    In the same time, send a technical report post with the tool of the platform (Help menu) and put a link of this topic in the message.

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

This variable is not used in the code error


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
cc267 @cc267 Participant
Summary

This topic contains 12 replies,
has 4 voices, and was last updated by Nicolas
4 years, 11 months ago.

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