Static RSI and CCI on historic data?!

 

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.

Files:
wtfisdis.png  63 kb
 
NarubiaN:

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.

Check if the chart history is complete. Print the Bid as well to see what's going on.
 
lippmaje:
Check if the chart history is complete. Print the Bid as well to see what's going on.
Bid does seem to be moving. How do I check chart history?
 
NarubiaN:
Bid does seem to be moving. How do I check chart history?
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.
 
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
Files:
Table.png  102 kb
 
NarubiaN:
Aye. Same table I'm testing on seems to have functioning candles
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
Files:
Proceeds.png  95 kb
 
NarubiaN:
The chart does proceed along with the test
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.
 
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.

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