Nphamalgo v3.1
Nphamalgo v3.1
import npham_270888/nphamAlgo_grad/1
import npham_270888/nphamAlgo_Signal_Strength/1
import npham_270888/nphamAlgo_Sessions/3
dsbgr = "Dashboard"
get_pos(tablePosition) =>
h = hour(time, "GMT+7")
m = minute(time, "GMT+7")
s = second(time, "GMT+7")
float maxprofit_intrade = na
if signal == 'Buy'
maxprofit_intrade
buyMaxProfit := maxprofit("Sell")
sellMaxProfit := maxprofit("Sell")
//prebalance = 0.0
if buySignal
totalTrades += 1
if Price + spread < Price[1] - spread
successfulTrades += 1
else if Price + spread > Price[1] - spread
unsuccessfulTrades += 1
entry := "🟢"
profitUSD = ((Price[1] - spread) - close) * lotSize * 100
liquidity += profitUSD
// totalDrawdown += drawdown
if protfit < 0
if -profitUSD[1] > liquidity
accountBurned := true
if sellSignal
totalTrades += 1
if Price - spread > Price[1] + spread
successfulTrades += 1
else if Price - spread < Price[1] + spread
unsuccessfulTrades += 1
entry := "🔴"
profitUSD = (close - (Price[1] + spread)) * lotSize * 100
liquidity += profitUSD
// totalDrawdown += drawdown
if protfit < 0
if -profitUSD[1] > liquidity
accountBurned := true
if not na(timeSinceEntry)
hours := int(timeSinceEntry / 3600)
minutes := int((timeSinceEntry % 3600) / 60)
seconds := int(timeSinceEntry % 60)
bgSimple = #3b3b3b43
bgColorfulBlue = color.new(color.blue, colorStrength)
bgColorfulGreen = color.new(color.green, colorStrength)
bgColorfulRed = color.new(color.red, colorStrength)
bgColorfulOrange = color.new(color.orange, colorStrength)
bgColorfulPurple = color.new(color.purple, colorStrength)
dashboard() =>
random() =>
for i = 0 to 10
vert_height = 1
volume_indi() =>
C_Up = #42bda8
C_Down = #c2185b
vert_height = 1
filledCells = 0
for r = 10 to 0
else
filledCells := filledCells + 1
if fast_update
if bool(ta.change(close_btc)) or bool(ta.change(close_eth)) or
bool(ta.change(close_xrp)) or bool(ta.change(close_ltc)) or
bool(ta.change(close_bnb)) or
bool(ta.change(close_gbpjpy)) or bool(ta.change(close_eurjpy)) or
bool(ta.change(close_gbpaud)) or bool(ta.change(close_gbpnzd))
if showdsb
dashboard()
random()
volume_indi()
if showdsb
dashboard()
random()
volume_indi()
predictedtext2 = nphamAlgo_Signal_Strength.signal_strength()
label label_txt = na
if buySignal
alert("nphamAlgo V3 Buy 🟢 Signals With Signal Strength Level " + textt + " And
Status " + Gs_240 + " At " + str.tostring(close) + ".", alert.freq_once_per_bar)
else if sellSignal
alert("nphamAlgo V3 Sell 🔴 Signals With Signal Strength Level " + textt + " And
Status " + Gs_240 + " At " + str.tostring(close) + ".", alert.freq_once_per_bar)
label.delete(ath_label[1])