I'm using the FormatPriceMarker() method.
Can I use another double within the method eg. a double that updates its values within OnBarUpdate?
eg.
double mySecondPrice;
protected override void OnBarUpdate()
{
mySecondPrice = x[0]; // x being any dataseries
}
public override string FormatPriceMarker(double price)
{
if (price > mySecondPrice)
return price.toString();
else
return mySecondPrice.toString();
}
I know this seems trivial but could be a major issue if not done correctly.
Thank you.

)that takes on a negative signed value of the current EMA if it is trending down and keeps a positive value if trending up. Within FormatPriceMarker() I use this sign to plot an up or down arrow. The analyzer cells are set to >0 or <0 to color the cells green/red as well. I then return the negative value back to a correct positive value so the string is correctly displayed.

Comment