Forum

Index number vs. Index price

When I print this code, it gives me the index number instead of the price. I want to get the price and not the index number. double RSIValuesArray[ 6 ]; ArrayInitialize (RSIValuesArray, 0 ); for ( int i= 0 ; i< 6 ; i++) { RSIValuesArray[i] = iRSI ( _Symbol , _Period , 14

iBandsOnArray, ArrayMaximum, ArrayMinimum return zero values

Hello, Would anyone tell me why I get zero returns? Here is the code: double highBollingerArray[ 10 ]; double lowBollingerArray[ 10 ]; ArraySetAsSeries (highBollingerArray, true ); ArraySetAsSeries (lowBollingerArray, true ); double highestWaveBollinger = iBandsOnArray(highBollingerArray

Copy OrderProfit() to an array in sequence

Hello, I'm trying to copy OrderProfit() to an array, but only the last OrderProfit() value is populating the indexes. I'd like to get, for example the last five values of the OrderProfit(). Here is my code: double array[ 5 ]; for ( int i = 0 ; i <= OrdersHistoryTotal()- 1 ; i++) { if (

Finding ArrayMinimum of an RSI to be lower to a certain specified number level

Hello Forum, I am writing a function in MQL4 where I want the lowest array of an RSI to be lower than a number I define. There is no error when I compile it but it won't execute. These are the errors I get from the Journal. 2020.04.28 06:55:22.813 2019.11.05 00:00:03 Testing pass stopped due to a

Array Maximum is not returning the correct value

Hello forum, I am trying to get the Array Maximum value of an array. For this purpose, I copied the Bull Power Indicator. ArrayResize (HighestBullValueData, 15 ); for ( int i= 0 ; i< 15 ; i++) { HighestBullValueData[i] = ExtBullsBuffer[i]; // PrintFormat("HighestBullValueData

Display the value of an array instead of its index value in mql4

Hi, I would like to display the value of an indicator instead of its index value. Here is the code that I have created. Somehow, it only display the index number. I would like to display the value of the index. For this code, I am using the Bulls Power indicator. //highestValueForBulls double

Need code to limit total trade in the account and only 1 trade in the chart

Would anyone help me with this? This is the code I did: //limit number of trades for the account int accounttotaltrade=OrdersTotal(); double accounttradelimit=equity/500; //my execution (part of my argument) if(accounttotaltrade<accounttradelimit) … etc. For example, the accouttradelimit returns