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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    150 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    302 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    243 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    345 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    174 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X