Problem with background color

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #166128 quote
    Guibourse
    Participant
    Average

    Could you tell me why nothing appears on my chart with this indicator and how to solve the problem ? Thank you very much. This is my first one.

    indicator1 = CALL "Exemple ADX"[14]
    c0 = indicator1 > 20
    
    indicator2 = ExponentialAverage[200]
    c1 = close > indicator2
    c3 = close < indicator2
    
    indicator3 = CALL "last heikin" [2, 5, 1](close)
    c2 = close > indicator3
    c4 = close < indicator3
    
    vert = c0 AND c1 AND c2 
    rouge = c0 AND c3 AND c4
    
    If vert then
    backgroundcolor(0,255,0)
    Endif
    
    If rouge then
    backgroundcolor(255,0,0)
    Endif
    
    Return vert coloured (0,255,0) as "long", rouge coloured (255,0,0) as "short"
    
    
    #166258 quote
    robertogozzi
    Moderator
    Master

    I think the problem is in your CALLed indicators, since this one works (on Dax, 5 minutes):

    indicator1 = adx[14]//CALL "Exemple ADX"[14]
    c0 = indicator1 > 20
     
    indicator2 = ExponentialAverage[200]
    c1 = close > indicator2
    c3 = close < indicator2
     
    indicator3 = supertrend[3,10]//CALL "last heikin" [2, 5, 1](close)
    c2 = close > indicator3
    c4 = close < indicator3
     
    vert = c0 AND c1 AND c2
    rouge = c0 AND c3 AND c4
     
    If vert then
    backgroundcolor(0,255,0)
    Endif
     
    If rouge then
    backgroundcolor(255,0,0)
    Endif
     
    Return vert coloured (0,255,0) as "long", rouge coloured (255,0,0) as "short"
    Guibourse thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Problem with background color


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Guibourse @guibourse Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
4 years, 10 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 04/03/2021
Status: Active
Attachments: No files
Logo Logo
Loading...