NarubiaN:
Check if the chart history is complete. Print the Bid as well to see what's going on.
Hello my dudes. I'm backtesting an expert I created, and it doesn't seem to change CCI and RSI..?
Left side is the coded, right side is the backtest.
The code is within the OnTick scope.
lippmaje:
Open a chart on GBPUSD and check if it shows candles on Jan 2nd around 6:00, try different time frames from M1 to H1.
Aye. Same table I'm testing on seems to have functioning candles
Open a chart on GBPUSD and check if it shows candles on Jan 2nd around 6:00, try different time frames from M1 to H1.
Files:
Table.png
102 kb
The test shows data from around Jan 2nd 6 am, but the chart ends Dec 31st. What time period do you want to test, Dec, Jan? Provide more data about your test setup.
lippmaje:
The test shows data from around Jan 2nd 6 am, but the chart ends Dec 31st. What time period do you want to test, Dec, Jan? Provide more data about your test setup.
The chart does proceed along with the test
The test shows data from around Jan 2nd 6 am, but the chart ends Dec 31st. What time period do you want to test, Dec, Jan? Provide more data about your test setup.
Files:
Proceeds.png
95 kb
lippmaje:
It looks like a confusion of how to use an indicator in MQL5. RSICur resp CCICur just hold a handle to the indicators. To retrieve the actual values check the reference manual for a sample.
It looks like a confusion of how to use an indicator in MQL5. RSICur resp CCICur just hold a handle to the indicators. To retrieve the actual values check the reference manual for a sample.
Thanks man. Seems like a whole lotta manual calculating though, that I don't understand lol...
Do you maybe have any youtube/guide of a breakdown for what goes on there?
NarubiaN:
Thanks man. Seems like a whole lotta manual calculating though, that I don't understand lol...
Do you maybe have any youtube/guide of a breakdown for what goes on there?
Check this simple approach to get an idea:
static double buffer[1]; ResetLastError(); int hnd=iRSI(NULL,0,14,PRICE_MEDIAN); if(hnd==INVALID_HANDLE) { PrintFormat("failed to create handle of iRSI indicator for %s, error %d",_Symbol,GetLastError()); return false; } int indicator_shift=0; // most recent int amount=1; if(CopyBuffer(hnd,MAIN_LINE,indicator_shift,amount,buffer)<0) { PrintFormat("failed to copy data from iRSI indicator for %s, error %d",_Symbol,GetLastError()); return false; } double RSICur=buffer[0];
lippmaje:
Check this simple approach to get an idea:
Got me some steps closer, thank you very much

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 my dudes. I'm backtesting an expert I created, and it doesn't seem to change CCI and RSI..?
Left side is the coded, right side is the backtest.
The code is within the OnTick scope.