pondxyz:
Please insert the code correctly: when editing a message, press the button and paste your code into the pop-up window
When I add Indicator to window or when I change Timeframe, It very slow to load, How to fix this problem. Thanks
***
Already fix it by my self ^^
//+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { int limit =rates_total-prev_calculated; if(prev_calculated>0)limit++; for(int i = limit-1; i>=0; i--){ BufferData[i] = iWPR(_Symbol,_Period,14,i); } for(int i = limit-1; i>=0; i--){ //int period = (rates_total-i)<InpPeriod ? (rates_total-i) : InpPeriod; BufferMa1[i] = iMAOnArray(BufferData,0,InpPeriod1,0,InpMethod,i); BufferMa2[i] = iMAOnArray(BufferData,0,InpPeriod2,0,InpMethod,i); } return(rates_total); }
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.
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
//////////////////////////////////////////////////////////////////////////////////////////////////
I THINK IT MUST BE THIS CODE, BUT DON'T KNOW HOW TO FIX IT, ANY SUGGEST PLEASE!!!