Disliked{quote} {quote} how my indicator behaves / why there are such differences{image}Ignored
The difference is in a few lines of MQL4 programing
TDI Red Green.mq4 (non repainting)
for (i=limit-1;i>=0;i--) The -1 sets the counter to bar 1.
Bar 1 is closed and red /green will not change
TDI RealTime.mq4 (repainting)
for(int i=limit; i>=0; i--) The -1 removed sets counter to bar 0.
Bar O is open and is rising and falling with price action there for red /green will move up and down
Both above mentioned indicators use the same iRSI and iMAOnArray values
iRSI(NULL,0,RSI_Period,RSI_Price,i);
iMAOnArray(RSI,0,RSISignal_Period,0,RSISignal_Mode,i);
iMAOnArray(RSI,0,TradeSignal_Period,0,TradeSignal_Mode,i);
Synergy_Pro_TDI.mq4 use different values for iRSI and iMAOnArray and is hard coded (user can not change value)
iRSI(NULL, 0, RSI_Value, PRICE_TYPICAL, li_20);
iMAOnArray(g_ibuf_192, 0, 2, 0, MODE_SMMA, li_20);
iMAOnArray(g_ibuf_192, 0, 7, 0, MODE_SMA, li_20);
The difference you see is caused by the
Price Constants: PRICE_TYPICAL
Smoothing Methods: MODE_SMA, MODE_SMMA
AND change Synergy_Pro_TDI settings from:
10,5,34,3,1,7,0 to
13,0,34,2,0,7,0