Jack Sprat
New member
Hi!
I was trying to write a strategy that would give some sort of indication (vertical line, up/down arrow) when two conditions were met. What I have so far is :
addverticalLine( if price_trend crosses above 0 then high else double.nan);
addverticalLine( if price_trend crosses below 0 then low else double.nan);
addverticalLine( if up[1] < 1 and up > 0 then low else Double.NaN);
addverticalLine( if down[1] < 1 and down > 0 then high else Double.NaN);
What I would like is a line or arrow when both addverticalLine( if price_trend crosses above 0 then high else double.nan); and addverticalLine( if up[1] < 1 and up > 0 then low else Double.NaN); happen and then conversely when both addverticalLine( if price_trend crosses below 0 then low else double.nan); and addverticalLine( if down[1] < 1 and down > 0 then high else Double.NaN); happen.
I've been trying various things all day but the combinations I was coming up were still missing like half the signals. Any help would be greatly appreciated!
Thanks
I was trying to write a strategy that would give some sort of indication (vertical line, up/down arrow) when two conditions were met. What I have so far is :
addverticalLine( if price_trend crosses above 0 then high else double.nan);
addverticalLine( if price_trend crosses below 0 then low else double.nan);
addverticalLine( if up[1] < 1 and up > 0 then low else Double.NaN);
addverticalLine( if down[1] < 1 and down > 0 then high else Double.NaN);
What I would like is a line or arrow when both addverticalLine( if price_trend crosses above 0 then high else double.nan); and addverticalLine( if up[1] < 1 and up > 0 then low else Double.NaN); happen and then conversely when both addverticalLine( if price_trend crosses below 0 then low else double.nan); and addverticalLine( if down[1] < 1 and down > 0 then high else Double.NaN); happen.
I've been trying various things all day but the combinations I was coming up were still missing like half the signals. Any help would be greatly appreciated!
Thanks