I'm trying to get the current value of each line.
It seems that I use wrong values for the GetPrice method.
What should I use as StartPrice, TotalPriceRangs, and IsInverted?
The relevant part of my script is below, but results in wrong values:
myTrendChannel = Draw.TrendChannel(this, "MyTrendChannelDown", false, StartBarsAgoD, High[StartBarsAgoD], EndBarsAgoD, High[EndBarsAgoD], MinSwingD, Low[MinSwingD] );
ClearOutputWindow();
foreach (PriceLevel priceLevel in myTrendChannel.PriceLevels)
{
//priceLevel.Stroke = new Stroke(Brushes.Transparent);
double totalPriceRange = myTrendChannel.TrendEndAnchor.Price - myTrendChannel.TrendStartAnchor.Price;
double price = priceLevel.GetPrice( myTrendChannel.TrendEndAnchor.Price, totalPriceRange, false);
Print(price);
Print (priceLevel.Value);
}
Comment