Pinto André / Publications
Forum
counting loop problem
Hi all, I'm trying to loop through a sentence in order to count bars. I'm using the following code that it's not functioning as it should. please, any thoughts? int CountBars() { int bars; for ( int i= 1 ; i< Bars - 1 ; i++) { if ( iCustom ( NULL , 0 , "Heiken Ashi"
Capture current trade type
Hi all, I'm trying to generate the current open trade type but with the following code but the result is always 0 even when the current trade is a SELL. I've adapted the same function to collect the last (history) type trade and it worked fine. For this function i've changed the OrdersTotal for
MQL4 Time function miscalculation
Hi all, I have the following function where tries to calculate the time between the last closed trade and the current time. if the time difference is <> that a certain number of bars it gives a different result. that being said, during the backtest at some point the bar calculation begins to fail
Collect values from a function into an Array
Hi all, I'm trying to collect the return values from a function a put them into array. I've the doubt if it make sense to collect the values in the function itself or outside? On the other hand once the values are collected they can be used in array function (as arraymax) right? this is the function
Transfer Indicator to EA Code
Hi all, For performance reasons in the backtesting I' trying to transfer an indicator to my EA code. So reading the Topic on TRANSFERRING AN INDICATOR CODE INTO AN EXPERT ADVISOR CODE. INDICATOR STRUCTURE I'm still not getting a good result. The custom indicator that i'm trying to transfer is HMA in
ArrayMinumun () returning last value
Hi all, I'm trying to find the lowest value in an array that is determined between the last closed order and Timecurrent(). I'm always getting the last value of the buffer instead the minimum value of the array. I've tried to change every parameter but so far no luck. Please could you help me out
Array Minimum Calc Error
Hi all, i'm trying to calculate the minimum value of an array but the following error occurs: EURUSD,H4: incorrect start position 0 for ArrayMinimum function Please find below the code that i'm using: int ArrayCalcMin() { datetime Timeorder=LastOrderTime(); datetime Timeahora= TimeCurrent ();