Search results

  1. S

    CopyBuffer return -1

    Yes, No difference.
  2. S

    CopyBuffer return -1

    I feel I should include more of the code /////////////// INDICATOR FILE #include <file1.mqh> #property indicator_buffers 8 // code... ////////////FILE1.mqh #include <File2.mqh> //code... class ABC { private: double stochBuffer[300]; int handleStock; double low[300]...
  3. S

    CopyBuffer return -1

    Hi I have 1M chart among 3 more charts on the screen, A customer indicator is attached on both charts. The following does NOT produce INVALID_HANDLE Why is the CopyBuffer returning -1 ? if(handleStock==INVALID_HANDLE) Print ("invalid stochastic handle."); int copied =...
  4. S

    Indicator calculation

    Hi Is there a way to make iStochastic to calculate the indicator on only the necessary data in order to return the latest say 100 values and then after only calculate the new bars "dropping out the oldest" as they become available? I am not saying to limit the amount by using CopyBuffer but...
  5. S

    SERIES_LASTBAR_DATE

    Hi is SERIES_LASTBAR_DATE for the current "being drawn" bar or the one before it? i.e. bar[0] or bar[1]? thx
  6. S

    Turn off news flag

    Hi On the MT5 chart, how do I turn off the news flag at the bottom of the chart, it looks like little boxes with time on them and when mouse hover over, it gives the news alert title. thx
  7. S

    rates_total

    Hi does rates_total, // size of the price[] array change and if so, when? and how? and to what max. number? thx
  8. S

    adding pips to prices

    Hi I have a code that loops over different pairs, I want to add x pips to each pair price. since each pair has it's _Digits different, and _Digits is not accessable when I loop over different pairs in a Script. how can I get that since digits(does not take arguments)? thx
  9. S

    error copying 4806

    not sure how to do that. Also searched the docs "runtme errors" for INVALID_HANDLE for no avail.
  10. S

    error copying 4806

    is the following OK. if loops for a long time and I stop it manually. int f_iMa_Handle = iMA(nm, tf,fast_iMa,0,MODE_SMA,PRICE_CLOSE); while(CopyBuffer(f_iMa_Handle, 0, 0, y, f_Ma)<=0) Print("Error copying fast Ma ",GetLastError()); int s_iMa_Handle =...
  11. S

    binary data assignment

    isn't ^ mean xor? which is Input Output A B 0 0 0 0 1 1 1 0 1 1 1 0 ?? thx
  12. S

    binary data assignment

    Hi again I am not sure how to get MT5 to do this. string s1="0110001"; string s2="0010101"; string s3=s1^s2; I expecting 0100100 many thx
  13. S

    error copying 4806

    so the code that needs to be repeated would be the code that has to do with producing the indicator? i.e. int s_iMa_Handle = iMA(pair.names[i], pair.periods[j],slow_iMa,0,MODE_SMA,PRICE_CLOSE); you mean this code? if(CopyBuffer(s_iMa_Handle, 1, 0, y, s_Ma)<=0) Print("Error copying slow Ma...
  14. S

    error copying 4806

    If I switch the order of the last 2 lines, the last code line will produce the error copying 4806.
  15. S

    error copying 4806

    Hi I do not know if I am doing something wrong here for that error to appear. the error only appears on the s_Ma buffer "last line" int x = Bars(pair.names[i], pair.periods[j]); //-- x --- amount of bars to process ------ int y = x-slow_iMa...
  16. S

    indicator shift

    Hi if ArraySetAsSeries is not set to true. and ma_period in the iMA is x and ma_shift in iMA is zero. would x be the index of the first "oldest" value in iMA that corresponds to the x index of the data? thx
  17. S

    copydate

    and how do I get the actual amount of bars on the chart in my code? "script code". thx
  18. S

    copydate

    Hi can I expect this "TerminalInfoInteger(TERMINAL_MAXBARS)" to work? I want to get all the data available on the terminal. int copied=CopyRates(pair.names[i], pair.periods[j], 0, TerminalInfoInteger(TERMINAL_MAXBARS), myRates); thx
  19. S

    FileIsExist certain folder

    Hi How can I get FileIsExist to search in a specific folder in my windows C driver? if changing the shared folder for all client terminals is the only way, then how do I change it? thx
  20. S

    IMAP4

    Hi Is there an IMAP4 for MT5? thx