Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator reading the plots of another indicator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Indicator reading the plots of another indicator

    Hello,

    i wrote an indicator that works on each tick calculation and creates plots for some given candles. It works perfectly. Let's call it indicator 1.
    I want to use the plots of this indicator in another indicator. ( indicator 2 ). Indicator 2 also works on each tick calculation. It should plot a horizontal line if indicator1.plot[1] > 0, at indicator 1 plot value.

    The problem is that it only works in historical state. And, even so, it does not read the plots of indicator 1, but it places the horizontal lines where they should be.

    Code of indicator 2 :


    Code:
    Print( indicatpr1.plot[1]);
    if ( indicator1.plot[1] > 0 )
    {
       DrawLine;
    }
    I checked the output for the historical calculation of indicator 2, and on every single bar the plot was read as 0, although it drew the lines.
    On realtime, the plots from indicator1 are also read as 0, but no lines are plotted.

    What could be the reason?

    #2
    Hello gyilaoliver,

    If the value was 0 that condition could not become true, are you certain its showing 0 and not a positive number? The code you have seems to be pseudocode, I mention that because of the DrawLine;, that is not valid. I would suggest doing a copy/paste from your code if you are providing a sample so we can see the specific syntax.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    561 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    325 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    547 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X