Getting a error when trying to plot signals

when I run
"doplot( buy, “buy”, colorgreen,styleDots);"

I get a error when attempting to backtest, "could not find function “stopme” " what is that all about? I just want to plot my signals on a chart to make adjustments to my strategy thanks,

have a second question, I want to calculate a streak. or consecutive days up or down.

example
day 1 = up (from day 0) = 1
day 2 = up (from day 1) = 2
day 3 = up (from day 2) = 3
day 4 = down =(-1)
day 5 = down =(-2)
day 6 = up = 1
etc.
ive been racking my brain for a few hours and cant figure out how to put that into a formula. I want a single number running count basically I mean I don’t need how many days, longest streak, shortest streak, etc. just for the day of calculation.

Hello,

it works for me. It must be something else.

Can you send me your code to help@collective2.com ?

I have found it.

  1. DoPlot accepted only numeric arrays as the first argument. But Buy is a logical array.
  2. That stopme function should actually return “Argument must be numeric. Function: Plot.”

Corrections:

  1. DoPlot accepts a logical array now. TRUE is plotted as 1, FALSE is plotted as zero.
  2. stopme returns “Argument must be numeric. Function: Plot.” now.

In order to have better graphs, I suggest:

DoPlot( buy * Close, “buy”, colorGreen,styleHistogram);

The “buy” chart looks like a Close bar when Buy = TRUE then.
I think it looks better than plotting just 0 and 1.

I added an answer to the Seetu documentation.

See this: https://collective2.com/seetudoc/id_seetu_code_example_streak-01.html

thank you so much. very helpful and exactly what I needed.

another question, is there a way to plot items on separate graphs? for instance a graph of price action and a graph of streaks.

also you might want to add this to the code example ;
streakUp = BarsSince(NOT dayUp);
streakDown = BarsSince(NOT dayDown) * -1;
streak = (streakUp - (-streakDown));
this will return a single digit that tell the number of days in streak as well as which way the streak is running.

This is not possible. We have just one graph.