indicator("Signaux d'achat/vente avec MACD, Stochastic, Demarker, RSI et
Support/Résistance)- Par [GArdy]",
--- Paramètres des indicateurs ---
rsi_period = [Link](14, title="Période RSI", minval=1
macd_short = [Link](12, title="MACD - Court", minval=1)
macd_long = [Link](26, title="MACD - Long", minval=1)
macd_signal = [Link](9, title="MACD - Signal", minval=1)
stoch_k = [Link](14, title="Stochastic - %K", minval=1)
stoch_d = [Link](3, title="Stochastic - %D", minval=1)
demarker_period = [Link](14, title="Période Demarker", minval=1)
// --- Calcul des indicateurs ---
// RSI
rsi_value = [Link](close, rsi_period)
// MACD
[macd_line, signal_line, _] = [Link](close, macd_short, macd_long, macd_signal)
// Stochastic
stoch_k_value = [Link](close, high, low, stoch_k)
stoch_d_value = [Link](stoch_k_value, stoch_d)
// Demarker
demarker_value = [Link](close, demarker_period)
// Calcul des supports et résistances
support_level = [Link](close, 50) // 50 bougies pour le support
resistance_level = [Link](close, 50) // 50 bougies pour la résistance
// --- Conditions d'achat et de vente ---
// Conditions d'achat
achat_condition = (rsi_value < 30 and macd_line > signal_line and stoch_k_value <
20 and stoch_d_value < 20 and demarker_value > 0.5 and close > support_level)
vente_condition = (rsi_value > 70 and macd_line < signal_line and stoch_k_value >
80 and stoch_d_value > 80 and demarker_value < 0.5 and close < resistance_level)
// --- Affichage des signaux ---
// Signal d'achat
plotshape(achat_condition, title="Signal Achat", location=[Link],
color=[Link], style=[Link], text="ACHETER - Par [Votre Nom]")
// Signal de vente
plotshape(vente_condition, title="Signal Vente", location=[Link],
color=[Link], style=[Link], text="VENDRE - Par [Votre Nom]")
// Affichage des niveaux de support et résistance
plot(support_level, color=[Link], linewidth=2, title="Support")
plot(resistance_level, color=[Link], linewidth=2, title="Résistance")