Hi! Anyone knows how to do a simple compound operation with fold? For example every time THIS CONDITION IS TRUE then + 1?? Thanks!by FluffyClouds - Trading Discussion
Tanman, thanks. Yes Mobius has help me a out a bit, just though I tried to figure it out on my own and also try other sources before I reach out to him again.... BUT! really? referencing a specific number of instances of a condition is advanced?? To tell you the truth almost anything is advanced for me as I've barely scratched the surface. The examples and tutorials on the learning center aby FluffyClouds - Trading Discussion
Hi all! I've worked out extending the line to infinity using !isnan... I would like to only plot the last two peaks of the following: plot ArrowDOWN = Peak; ArrowDOWN.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN); ArrowDOWN.SetDefaultColor(Color.WHITE); ArrowDOWN.SetLineWeight(1); plot Upperline = if ArrowDOWN then high else Double.NaN; Upperline.EnableApproximatioby FluffyClouds - Trading Discussion
Also! for some reason when extending the line it will only plot up to bars previous to the current bar, so if the Peak def ( above ) is looking up 10 bars back, the extension will plot as expected but will always leave a space of 10 bars from where it plots to the current bar... Just modifying a script I found here to show only the most recent two points and add alerts when the price breachesby FluffyClouds - Trading Discussion
This should be simple enough but I can't figure out for the life of me how to plot only the last two signals of a simple swing peak like this def Peak = high > Highest(high[1], 20) and high > Highest(high[-20], 20); plot ArrowDOWN = Peak; plot Signal = Peak; I setup a counter and a label to get some feedback and I'm getting n/a as the output of the counter def counter = ifby FluffyClouds - Trading Discussion