This is repeated endlessly, here we have a "range" filled to the brim with moments where the actors have accumulated, then manipulated to place large orders and distribute liquidity.

Although the indicator is quite effective in finding entry and exit points (based on RSI, SMA), it can still be wrong because it is not aware of these 3 phases.

only 2 points were found, but we want to find all the points, to follow the variations.

The program could be like this:

If rsi < 35 and descent lasts 13 minutes > rise over 13 minutes and price = lowest over 13 minutes

With this we have entry points, but they must be monitored.

If price goes down in 1 minute

50% chance Wait, batch trade.

If the price goes up in 1 minute, there may be manipulation

50% back on purchase.

By placing several small orders and monitoring them, you can achieve a certain profit goal.

Attempt to learn the 3 phases algorithmically.

First we have an accumulation.

👉 uncertain zone, relative to the trend

👉 against zone

👉 in reality you just need to have an entry point and calculate the trend

Tendance = math.sum( close-close[33]) > 0? True:false

👉 then to spot a change in trend it is manipulation

👉 find the lowest point, with rsi < 35, and descent > rise

To spot the change in trend we can simply compare 2 trends

TendanceManipulation = math.sum( close-close[33]) > 0? True:false

Tendance = math.sum( close[33]-close[66]) > 0? True:false

If Trend and TrendManipulation== false

Or Trend==false and TrendManipulation==true

The accumulation phase is over, large orders must be placed

Otherwise

To wait for

The Future is the hybridization between algorithmic precision and analytical trading.

// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/

// © jeromehorus

//@version=6

indicator("bot de range market 4.0" ,overlay=true)

range=input.int(13,"vertices")

clos = ta.sma(close,13)

float dm =0

float dd =0

for i = 0 to plage

m= clos-clos[1]>0?true:false

diff= math.abs(clos-clos[1])

dm := m? dm+diff:dm

dd := m==false? dd+diff:dd

bas = ta.lowest(close,13)

high = ta.highest(close,13)

rsip = input.int(13,"play rsi")

rsivb = input.int(35,"value onSale")

rsivh = input.int(70,"overbuy value")

rsiv = ta.rsi(close,rsip)

eml = input.int(1,"longeur ema")

ema200 = ta.ema(close,eml)

ema666 = ta.ema(close,666)

m6 = ema666 - ema666[1] >0? true:false

plot( ema200, color= m6? color.green:color.red)

m2 = ema200 - ema200[1] >0? true:false

base = ta.lowest(close,33)

high = ta.highest(close,33)

plot( close, color= close> haute[13] ? color.green: close< base[13]? color.red: color.yellow,linewidth=5)

if (close==bas and dd>dm and rsiv< rsivb)// and m2==false)

label.new(bar_index, low, "B", style=label.style_label_up, color=close>haute[13]?color.green:color.rgb(0,122,0), textcolor=color.white)

//alert("The price is low, possibility of purchase?", alert.freq_once)

alert("SIGNAL BAS",freq=alert.freq_once_per_bar_close)

if (close==haut and dm>dd and rsiv > rsivh)// and m2)

label.new(bar_index, high, "S", style=label.style_label_down, color=close<base[13]?color.red:color.rgb(255,55,55), textcolor=color.white)

//alert("The price is high, possibility of sale?", alert.freq_once)

alert("SIGNAL HAUT",freq=alert.freq_once_per_bar_close)

plot(close)