简体   繁体   English

我如何在 mql5 上找到过去 50 根蜡烛中的最低值?

[英]How do I find the lowest value in the past 50 candles on mql5?

I would like to find out the lowest traded price in the past 50 candles.我想找出过去 50 根蜡烛中的最低交易价格。 I've used the following code.我使用了以下代码。

double Lowest_Low = iLowest(_Symbol,PERIOD_CURRENT,MODE_LOW,50,0);

I've tried using -50, but it does not give me the lowest price on the chart.我试过使用 -50,但它没有给我图表上的最低价格。

You're using the iLowest function incorrectly.您错误地使用了iLowest function。 This function returns the shift of the lowest value over a specific number of bars.这个 function 返回最低值在特定数量的柱上的偏移 You need to combine it with iLow to get the value, as follows:需要结合iLow得到值,如下:

double Lowest_Low = iLow(NULL, 0, iLowest(NULL, 0, MODE_LOW, 50, 0));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM