it redraws, I tested it on btcusd 1 min, and arrows appeared 3 candles too lateCentaur wrote: Sat Feb 11, 2023 7:41 am Some additional comments on the Vulkan Profit: This is the basis of the Sidus Method Trading System with two linear weighted moving averages and two exponential moving averages.
Re: No Nonsense Forex - Indicators
162Hi Rambo, I've tested the indicator extensively on all timeframes, and repainting is definitely not an issue see attached screen recording of the BTCUSD 1 minute.rambo wrote: Wed Feb 15, 2023 4:22 pm it redraws, I tested it on btcusd 1 min, and arrows appeared 3 candles too late
No repainting?
半人馬座
Bàn rénmǎzuò
If you enjoy my work please hit the like button, to show some support.
All comments, criticism, advise or general ideas are more than welcome. In fact its crucial to have a continues learning / developing mechanism not just for me but all fellow market enthusiasts.
Bàn rénmǎzuò
If you enjoy my work please hit the like button, to show some support.
All comments, criticism, advise or general ideas are more than welcome. In fact its crucial to have a continues learning / developing mechanism not just for me but all fellow market enthusiasts.
Re: No Nonsense Forex - Indicators
163If you mean the cross is too late for you, its because the tunnel / ribbon / channel need to cross completely before a signal is produced.Centaur wrote: Wed Feb 15, 2023 6:16 pm Strategy Tester Visualization _ Vulkan Profit on BTCUSD,M1 from 2021.01.01 to 2023.02.10 2023-02-15 09-09-53.mp4
Hi Rambo, I've tested the indicator extensively on all timeframes, and repainting is definitely not an issue see attached screen recording of the BTCUSD 1 minute.
No repainting?
Definition of Repainting:
Past indicator data disappears / changes with the addition of new tick information.
This is definitely not the case for the Vulkan Profit or any of my indicators because I only recalculate the current bar with the addition of new tick information, hence past data cannot change, hence repainting is and never will be a problem.
半人馬座
Bàn rénmǎzuò
If you enjoy my work please hit the like button, to show some support.
All comments, criticism, advise or general ideas are more than welcome. In fact its crucial to have a continues learning / developing mechanism not just for me but all fellow market enthusiasts.
Bàn rénmǎzuò
If you enjoy my work please hit the like button, to show some support.
All comments, criticism, advise or general ideas are more than welcome. In fact its crucial to have a continues learning / developing mechanism not just for me but all fellow market enthusiasts.
Re: No Nonsense Forex - Indicators
164yes that's what I meant, it's giving to late of a signal since we are nnfx traders right. so this indicator wouldn't work for usCentaur wrote: Wed Feb 15, 2023 6:22 pm If you mean the cross is too late for you, its because the tunnel / ribbon / channel need to cross completely before a signal is produced.
Definition of Repainting:
Past indicator data disappears / changes with the addition of new tick information.
This is definitely not the case for the Vulkan Profit or any of my indicators because I only recalculate the current bar with the addition of new tick information, hence past data cannot change, hence repainting is and never will be a problem.
Re: No Nonsense Forex - Indicators
165Kalman Filter
The Kalman Filter is an efficient optimal estimator (a set of mathematical equations) that provides a recursive computational methodology for estimating the state of a discrete-data controlled process from measurements that are typically noisy, while providing an estimate of the uncertainty of the estimates.
A perfect signal filter for any indicator. Use this to filter direct price data before inputting the information into an indicator calculation or alternatively to filter out noise from an indicator output.
I'm of the opinion this is a much better filter than the Jurik Filter.
The Kalman Filter is an efficient optimal estimator (a set of mathematical equations) that provides a recursive computational methodology for estimating the state of a discrete-data controlled process from measurements that are typically noisy, while providing an estimate of the uncertainty of the estimates.
A perfect signal filter for any indicator. Use this to filter direct price data before inputting the information into an indicator calculation or alternatively to filter out noise from an indicator output.
I'm of the opinion this is a much better filter than the Jurik Filter.
- These users thanked the author Centaur for the post:
- Chickenspicy
半人馬座
Bàn rénmǎzuò
If you enjoy my work please hit the like button, to show some support.
All comments, criticism, advise or general ideas are more than welcome. In fact its crucial to have a continues learning / developing mechanism not just for me but all fellow market enthusiasts.
Bàn rénmǎzuò
If you enjoy my work please hit the like button, to show some support.
All comments, criticism, advise or general ideas are more than welcome. In fact its crucial to have a continues learning / developing mechanism not just for me but all fellow market enthusiasts.
Re: No Nonsense Forex - Indicators
166Thank you very much for posting the different Vortex calculations. I found this to be very helpful implementing into a version I found on Tradingview.
Re: No Nonsense Forex - Indicators
167My pleasure, just a correction, the Vortex is a trademarked indicator by Etienne Botes and Douglas Siepman. The calculations shown was different calculations picked up for an indicator known as "buy sell pressure". The concept is pretty much the same.sheezey wrote: Sun Feb 19, 2023 4:31 pm Thank you very much for posting the different Vortex calculations. I found this to be very helpful implementing into a version I found on Tradingview.
Please share the TV version you implemented it on, for interest sake.
半人馬座
Bàn rénmǎzuò
If you enjoy my work please hit the like button, to show some support.
All comments, criticism, advise or general ideas are more than welcome. In fact its crucial to have a continues learning / developing mechanism not just for me but all fellow market enthusiasts.
Bàn rénmǎzuò
If you enjoy my work please hit the like button, to show some support.
All comments, criticism, advise or general ideas are more than welcome. In fact its crucial to have a continues learning / developing mechanism not just for me but all fellow market enthusiasts.
Re: No Nonsense Forex - Indicators
168An updated calculation for the Kalman Filter, changing input k-value to integer, and removing sharpness value as input (k-value of 1 equivalent to a slow period MA, and a k-value of 2000 is equivalent to a fast MA, reverse way around as normal:Centaur wrote: Thu Feb 16, 2023 10:21 pm Kalman Filter
The Kalman Filter is an efficient optimal estimator (a set of mathematical equations) that provides a recursive computational methodology for estimating the state of a discrete-data controlled process from measurements that are typically noisy, while providing an estimate of the uncertainty of the estimates.
A perfect signal filter for any indicator. Use this to filter direct price data before inputting the information into an indicator calculation or alternatively to filter out noise from an indicator output.
I'm of the opinion this is a much better filter than the Jurik Filter.
Code: Select all
//+------------------------------------------------------------------+
//| Kalman Filter (KF) |
//+------------------------------------------------------------------+
int filKalman(const int rates_total,
const int prev_calculated,
const int k_val, // min val = 1; max val = 2000
const double &source[],
double &temp_velocity[],
double &result[])
{
//--- bar index start
int bar_index;
if(prev_calculated == 0)
bar_index = 0;
else
bar_index = prev_calculated - 1;
//--- main loop
for(int i = bar_index; i < rates_total && !_StopFlag; i++)
{
if(i < 1)
{
temp_velocity[i] = 0.0;
result[i] = source[i];
}
else
{
double distance = source[i] - result[i - 1];
double error = result[i - 1] + distance * sqrt((k_val / 10000.0) * 2.0);
temp_velocity[i] = temp_velocity[i - 1] + (distance * k_val / 10000.0);
result[i] = error + temp_velocity[i];
}
}
return(rates_total);
}
半人馬座
Bàn rénmǎzuò
If you enjoy my work please hit the like button, to show some support.
All comments, criticism, advise or general ideas are more than welcome. In fact its crucial to have a continues learning / developing mechanism not just for me but all fellow market enthusiasts.
Bàn rénmǎzuò
If you enjoy my work please hit the like button, to show some support.
All comments, criticism, advise or general ideas are more than welcome. In fact its crucial to have a continues learning / developing mechanism not just for me but all fellow market enthusiasts.
Re: No Nonsense Forex - Indicators
169Updated code for a Jurik Filter, the benefit of this filter is its ability to smooth data:Centaur wrote: Sat Nov 19, 2022 4:47 pm Jurik Moving Average
Converted tradingview indicator: https://in.tradingview.com/v/gwzRz6tI/
Please if someone with the previous JMA can compare: some screenshots will be nice.
Code: Select all
//+------------------------------------------------------------------+
//| Jurik Filter (JF) |
//+------------------------------------------------------------------+
int filJurik(const int rates_total,
const int prev_calculated,
const int length,
const int phase,
const double &source[],
double &temp_bsmax[],
double &temp_bsmin[],
double &temp_volty[],
double &temp_vsum[],
double &temp_avolty[],
double &temp_ma1[],
double &temp_det0[],
double &temp_e2[],
double &result[])
{
//--- bar index start
int bar_index;
double len1 = fmax(log(sqrt(0.5 * (double(length) - 1.0))) / log(2.0) + 2.0, 0.0);
double len2 = sqrt(0.5 * (double(length) - 1.0)) * len1;
double pow1 = fmax(len1 - 2.0, 0.5);
double beta = 0.45 * (double(length) - 1.0) / (0.45 * (double(length) - 1.0) + 2.0);
double div = 1.0 / (10.0 + 10.0 * (fmin(fmax(double(length) - 10.0, 0.0), 100.0)) / 100.0);
double phaseRatio = phase < -100 ? 0.5 : phase > 100 ? 2.5 : 1.5 + phase * 0.01;
double bet = len2 / (len2 + 1);
if(prev_calculated == 0)
bar_index = 0;
else
bar_index = prev_calculated - 1;
//--- main loop
for(int i = bar_index; i < rates_total && !_StopFlag; i++)
{
if(i < 10)
{
temp_bsmax[i] = source[i];
temp_bsmin[i] = source[i];
temp_volty[i] = 0.0;
temp_vsum[i] = 0.0;
temp_avolty[i] = 0.0;
temp_ma1[i] = 0.0;
temp_det0[i] = 0.0;
temp_e2[i] = 0.0;
result[i] = source[i];
}
else
{
//--- price volatility
double del1 = source[i] - temp_bsmax[i - 1];
double del2 = source[i] - temp_bsmin[i - 1];
temp_volty[i] = fabs(del1) > fabs(del2) ? fabs(del1) : fabs(del2);
//--- relative price volatility factor
temp_vsum[i] = temp_vsum[i - 1] + div * (temp_volty[i] - temp_volty[i - 10]);
temp_avolty[i] = temp_avolty[i - 1] + (2.0 / (fmax(4.0 * double(length), 30.0) + 1.0)) * (temp_vsum[i] - temp_avolty[i - 1]);
double dVolty = temp_avolty[i] > 0.0 ? temp_volty[i] / temp_avolty[i] : 0.0;
dVolty = fmax(1.0, fmin(pow(len1, 1.0 / pow1), dVolty));
//--- jurik volatility bands
double pow2 = pow(dVolty, pow1);
double Kv = pow(bet, sqrt(pow2));
temp_bsmax[i] = del1 > 0.0 ? source[i] : source[i] - Kv * del1;
temp_bsmin[i] = del2 < 0.0 ? source[i] : source[i] - Kv * del2;
//--- jurik dynamic factor
double alpha = pow(beta, pow2);
//--- 1st stage - prelimimary smoothing by adaptive EMA
temp_ma1[i] = (1.0 - alpha) * source[i] + alpha * temp_ma1[i - 1];
//--- 2nd stage - one more prelimimary smoothing by kalman filter
temp_det0[i] = (source[i] - temp_ma1[i]) * (1.0 - beta) + beta * temp_det0[i - 1];
double ma2 = temp_ma1[i] + phaseRatio * temp_det0[i];
//--- 3rd stage - final smoothing by unique jurik adaptive filter
temp_e2[i] = (ma2 - result[i - 1]) * pow(1.0 - alpha, 2.0) + pow(alpha, 2.0) * temp_e2[i - 1];
result[i] = temp_e2[i] + result[i - 1];
}
}
return(rates_total);
}
半人馬座
Bàn rénmǎzuò
If you enjoy my work please hit the like button, to show some support.
All comments, criticism, advise or general ideas are more than welcome. In fact its crucial to have a continues learning / developing mechanism not just for me but all fellow market enthusiasts.
Bàn rénmǎzuò
If you enjoy my work please hit the like button, to show some support.
All comments, criticism, advise or general ideas are more than welcome. In fact its crucial to have a continues learning / developing mechanism not just for me but all fellow market enthusiasts.
Re: No Nonsense Forex - Indicators
170Cong Adaptive Moving Average (CAMA)
https://in.tradingview.com/script/hOCmX ... g-Average/
https://in.tradingview.com/script/hOCmX ... g-Average/
Code: Select all
//+------------------------------------------------------------------+
//| Cong Adaptive Moving Average (CAMA) |
//+------------------------------------------------------------------+
int maCongAdaptive(const int rates_total,
const int prev_calculated,
const int value_length, // min val: 1; default val: 10
const double &source_price[],
const double &source_high[],
const double &source_low[],
const double &source_close[],
double &temp_true_range[],
double &result_value[],
double &result_color[])
{
//--- bar index start
int bar_index;
if(prev_calculated == 0)
bar_index = 0;
else
bar_index = prev_calculated - 1;
//--- main loop
for(int i = bar_index; i < rates_total && !_StopFlag; i++)
{
temp_true_range[i] = i < 1 ? source_high[i] - source_low[i] : fmax(source_high[i] - source_low[i], fmax(fabs(source_high[i] - source_close[i - 1]), fabs(source_low[i] - source_close[i - 1])));
if(i < value_length)
{
result_value[i] = source_price[i];
result_color[i] = EMPTY_VALUE;
}
else
{
double denom = 0.0, hh = -DBL_MAX, ll = DBL_MAX;
for(int k = 0; k < value_length; k++)
{
denom += temp_true_range[i - k];
hh = source_high[i - k] > hh ? source_high[i - k] : hh;
ll = source_low[i - k] < ll ? source_low[i - k] : ll;
}
double num = hh - ll;
double alpha = num / denom;
result_value[i] = alpha == 1.0 ? alpha * source_price[i] : alpha * source_price[i] + (1.0 - alpha) * result_value[i - 1];
result_color[i] = StringToDouble(DoubleToString(result_value[i], _Digits)) > StringToDouble(DoubleToString(result_value[i - 1], _Digits)) ? 0.0 : StringToDouble(DoubleToString(result_value[i], _Digits)) < StringToDouble(DoubleToString(result_value[i - 1], _Digits)) ? 1.0 : result_color[i - 1];
}
}
return(rates_total);
}
- These users thanked the author Centaur for the post (total 4):
- sylvester21, Chickenspicy, Jimmy, mrtools
半人馬座
Bàn rénmǎzuò
If you enjoy my work please hit the like button, to show some support.
All comments, criticism, advise or general ideas are more than welcome. In fact its crucial to have a continues learning / developing mechanism not just for me but all fellow market enthusiasts.
Bàn rénmǎzuò
If you enjoy my work please hit the like button, to show some support.
All comments, criticism, advise or general ideas are more than welcome. In fact its crucial to have a continues learning / developing mechanism not just for me but all fellow market enthusiasts.