Profile Picture

SetBarBackgroundColor

Posted By jcr Last Year
Message
jcr
Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)
Posted Thursday June 16 2016
I am sorry to ask again this question.
I saw different questions about it in the forum.
Could any caritative soul write a "full complete example" that I can copy/paste?

If signal (RSI level, openPosition...,whatever)
setBarBackgroundColor(StartBar, EndBar, Color)

My problem is with StartBar and EndBar. I get the horizontal lines each bar.
Thanks in advance for your time.
Sorry again!
Posted Friday June 17 2016
Is this what you are looking for?

if (RSI level, openPosition...,whatever)
{
ChartPane pricePane = SystemData.GetPricePane(Symbol);
pricePane.SetBarColor(Bars.LookBack(0), Bars.LookBack(0), Color.Red);
}
jcr
Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)Supreme Being (1,245 reputation)
Posted Friday June 17 2016
Thanks for your answer, I really appreciate it.
I am trying to see green background color if positive trade and red background color if negative trade for example.
Code goes inside ClosedPositions foreach loop?
How to get the StartBar?

private void setBarBackgroundColorByTradeResult()
{
        foreach (Position p in ClosedPositions)
        {

               ChartPane pricePane = SystemData.GetPricePane(Symbol);
               pricePane.SetBarBackgroundColor (Bars.Current, Bars.Current, (p.RealizedProfit >= 0 ? Color.Green : Color.Red));

        }
}
   




Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems