- PRICE_WEIGHTED is a ENUM_APPLIED_PRICE not whatever enPrices is.
- Please don't post a link to an image, just insert
the image.
Messages Editor - For links, please use the link button (Control+K) See the difference? https://imgur.com/a/2X5rXiF
Messages Editor - Are you getting the handle in OnInit? In OnTick you use the handle, shift and count to get the data.
Technical Indicators - Reference on algorithmic/automated trading language for MetaTrader 5
Timeseries and Indicators Access / CopyBuffer - Reference on algorithmic/automated trading language for MetaTrader 5
How to start with MQL5 - General - MQL5 programming forum - Page 3 #22 2020.03.08
How to call indicators in MQL5 - MQL5 Articles 12 March 2010Also see my example for encapsulating calls
Detailed explanation of iCustom - MQL4 programming forum 2017.05.23
Hi William and thanks for your answer.
1. I forgot to add the enPrices enum:
enum enPrices { pr_close =PRICE_CLOSE, // Close pr_open =PRICE_OPEN, // Open pr_high =PRICE_HIGH, // High pr_low =PRICE_LOW, // Low pr_median =PRICE_MEDIAN, // Median pr_typical =PRICE_TYPICAL, // Typical pr_weighted=PRICE_WEIGHTED, // Weighted pr_lowhigh =-99 // Low/High };
Do i need to add as parameter "pr_weighted" instead of PRICE_WEIGHTED ?
2. Unluckily it looks like im not able to do that, may im missing some reputation.
4. I am calling the icustom function inside OnTick(). Oh now i got it, thanks a lot.

Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
- www.mql5.com
//| Expert initialization function | //| Expert deinitialization function | //| Expert tick function | //| test1 |...

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
Hi, i was trying to load a custom indicator with icustom, not available trough the "i*" functions.
The values for inpStoPeriod, inpSmtPeriod1, inpSmtPeriod2, inpSigPeriod are set over input fields.
The indicator itself has the following inputs
The indicator is load successfully on the strategy tester according to the journey, aswell there seem to be no errors.
But the indicator window stacks on ~each tick. After a short time there are 3-5 Stochastic windows with the same result, that keeps going until the chart dissappear.
Aswell when trying to run the EA withouth visual it takes 30 minutes to end the test for a single day.
Edit: The indicator i like to load: https://www.mql5.com/en/code/23277
Edit2: Aswell a picture of the problem https://imgur.com/a/2X5rXiF
Edit3: Are there any advantages loading the indicator with "IndicatorCreate" function ?
Please tell me what i did wrong.