-
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
Messages Editor -
Your iCustom call's comments are nonsense.
Currency_Strength My_expert //--- input variables input int ma_period_=20; input int ma_delta=1; input bool ShowEUR=true; input bool ShowGBP=false; input bool ShowAUD=false; input bool ShowNZD=false; input bool ShowUSD=false; input bool ShowCAD=false; input bool ShowCHF=false; input bool ShowJPY=true;
g_handle = iCustom( symbol, // Symbol period, // Period "CURRENCY_STRENGTH_INDEX", // Indicat 20, 1, 1, // Latency (Refresh delay in seconds) 0 means every tick 1, // Log level (Trace = 0, Info = 1, Warning = 2, Error = 3, Critical = 4) 1, // Candles for calculation 1, // Candles shift from the beginning 1, // Use Moving Average smoothing 1, // Moving Average Period for smoothing 1, // Moving Average Method for smoothing 1 // Auto detect symbols suffix ("Use suffix" should be disabled) );
-
if(MathAbs(strength[0] - EMPTY_VALUE) < 0.0001)
Your indicator does not use EMPTY_VALUE, so your if will never be true.
William Roeder #:
i apologize for my messy work its my first time in this forum, i have checked on the if condition and omitted it and it seemed to work the 'csi has no data' stopped showing in the journal but still no trades are being executed in real time but it doesn't have the same problem in the strategy tester shows clear data, do you have any idea as to this.
-
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
Messages Editor -
Your iCustom call's comments are nonsense.
Currency_Strength My_expert - Your indicator does not use EMPTY_VALUE, so your if will never be true.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hello programmers, i created an expert advisor that among other indicators uses the currency strength index indicator to evaluate the final bool buy or sell condition and it seemed to have worked perfectly even showed trades running in the strategy tester but when i took it live no trade was executed, upon doing some digging i found out that the copybuffer function for the currency strength index kept evaluating to "CSM failed, no data" and i can't seem to fix it. i suspect the root of the bug being that most currency strength indicators scales' ,for which i derived the copybuffer function,run from 0 to 100 but the currency strength index runs between -0.01 to 0.01 therefore their copybuffer parameters should differ but i just cant find out how. Here is the part of the error;
Below are the uploaded include file and expert advisor that execute trades and the currency strength index file.