thank you
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
double minValue = chartScale.MinValue;
Collapse
X
-
Hello frankduc,
Thanks for your post.
I do not understand your inquiry. ChartScale.MinValue represents the lowest value that the chart would use for the Y axis, so this would not have a bar index. ChartScale.MinValue also is not a method.
ChartScale.MinValue - https://ninjatrader.com/support/help...e_minvalue.htm
Could you clarify on your goal so we can provide further insight?
We look forward to assisting.
-
It returns the minimum value on the chart. In my chart the minimum value returned is 2971.66 even if the lowest value showed is 2974.5 for the last 3 days on the emini.
It represents bars ago 727 or 854 of 1581. I want the number 727 or 854.
Its because i use cursorX when i click on the chart the position in bar have an impact on all my calculations. The thing is, as a new bar appear on the chart the lowest value is moving. I want to replace cursorX by the bar with the minimum value. I thought if i could get the bar number of minValue i could replace cursorX.
Comment
-
Hello frankduc,
ChartScale.MinValue shows the smallest value on the Y axis, it does not show the smallest bar value on the chart.
If you are trying to find the bar with the lowest value on the chart, you could loop through all bars on the chart and see which one has the lowest value, and save the index as a variable whenever a new lowest value is found.
Please let us know if we can be of further assistance.
Comment
-
Hi,I would like to know if i used the right method because i replaced Bars.GetHigh by Bars.GetLow and its not returning the lowest low bar of the index. I dont understand with GetHigh it return the highest bar of the visible bars on the chart but not with GetLow.for (int barIndex = ChartBars.FromIndex; barIndex <= ChartBars.ToIndex; barIndex++){if (Bars.GetLow(barIndex) > lowPrice){lowPrice = Bars.GetLow(barIndex);index = barIndex;Print(index);}}
Thank youLast edited by frankduc; 07-22-2019, 07:08 AM.
Comment
-
found it thank you
double lowPrice = Int32.MaxValue;
int index = 0;
for (int barIndex = ChartBars.FromIndex; barIndex <= ChartBars.ToIndex; barIndex++)
{
if (Bars.GetLow(barIndex) < lowPrice)
{
lowPrice = Bars.GetLow(barIndex);
index = barIndex;
Print(index);
}
}
tyLast edited by frankduc; 07-23-2019, 11:38 AM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
581 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
338 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment