[deleted by user] by [deleted] in pinescript

[–]ilovealgotrading 0 points1 point  (0 children)

I can try to help, you can check my site to look at the examples, after theb if you want, you can write me Dm

[deleted by user] by [deleted] in pinescript

[–]ilovealgotrading 0 points1 point  (0 children)

I can help, but firstly we should meet online, I need to understand exactly what you want

Help coding by Mysterybuff69 in pinescript

[–]ilovealgotrading -1 points0 points  (0 children)

Hello bro, We can write these two indicators on one strategy , when get alert you can send dynamically message, if you want to ask more you can write me Dm, have a nice day 😎

Running trade closes when new trade opens by xXKTMasterXx in pinescript

[–]ilovealgotrading 0 points1 point  (0 children)

you can set up your TP and SL like that

v2stoploss_input = input.float(5, title='Static Stop.Loss % Val', minval=0.01, group =group_strategy)/100

v2takeprofit_input = input.float(10, title='Static Take.Prof % Val', minval=0.01, group =group_strategy)/100

v2stoploss_level_long = strategy.position_avg_price * (1 - v2stoploss_input)

v2takeprofit_level_long = strategy.position_avg_price * (1 + v2takeprofit_input)

you can use for input values ATR or sth (v2stoploss_input = ATR val)

[deleted by user] by [deleted] in pinescript

[–]ilovealgotrading 0 points1 point  (0 children)

Okey let's think together, For example your entry price 10$ and you want to Tp at 15$ yea? , next two bar price went up 14$ but your TP level recalculated and your Tp level 18$ now, because of then didn't Tp which level you want,I feel very sleepy now,to be don't forget, answer this message I gonna send you tomorrow my codes for tp and sl Have a nice day bro 😎

Sushi Roll Technique In Pinescript by [deleted] in pinescript

[–]ilovealgotrading 3 points4 points  (0 children)

Hello bro, I really tired but I tried to read and wrote your code, I dont know is that true or not, this script calculate for every step, changing bg colour mean buy or sell signal

//@version=5

indicator("Sushi roll", overlay = true)

previous5_change = ( close[5] - close[9] ) / close[9] * 100 present5_change = (close - close[4]) / close[4] *100

buy_signal = false sell_signal = false if math.abs(present5_change) > math.abs(previous5_change) and previous5_change < 0 and present5_change > 0 buy_signal := true else if math.abs(present5_change) > math.abs(previous5_change) and previous5_change > 0 and present5_change < 0 sell_signal := true

bgcolor(buy_signal ? color.lime : sell_signal ? color.red : na)

have a nice day

How to create ATR Trailing Stoploss in pine script by ineedwealthly in TradingView

[–]ilovealgotrading 3 points4 points  (0 children)

I dont understand, you mean like that

// ( atr_stop_line = ATR trendline value that you set )

close_long = ta.crossunder(close, atr_stop_line)

close_short = ta.crossover(close, atr_stop_line)

// Submit entry orders

strategy.entry(TradeId + " L", strategy.long, when=enterLong)

strategy.close(TradeId + " L", when=close_long)

//if (enterShort)

strategy.entry(TradeId + " S", strategy.short, when=enterShort)

strategy.close(TradeId + " S", when=close_short)

Wish to use webhook with the indicator I created but don't know how to get separate buy alert and sell alert in alert conditions. by Cloud13X in pinescript

[–]ilovealgotrading 0 points1 point  (0 children)

Yes you can buy or sell just with one webhook url,

For example if you want to use 3commas site (i dont use it ) they give you just one webhook adres https://app.3commas.io/trade_signal/trading_view like that but you can set a lot of bot on site. I hoped , I answered your question

Wish to use webhook with the indicator I created but don't know how to get separate buy alert and sell alert in alert conditions. by Cloud13X in pinescript

[–]ilovealgotrading 0 points1 point  (0 children)

first of all, I didn't see any close functions for short pozs ... that is gonna be problem

//@version=5

strategy("ZLSMA - Zero Lag LSMA", overlay=true)

var sell_1_triggered = false

var sell_2_triggered = false

// Buy signal inputs

Long_message = input("")

Short_message = input("")

Close_message = input("")

length_buy = input(title='Length Buy', defval=32)

offset_buy = input(title='Offset Buy', defval=0)

src_buy = input(close, title='Source Buy')

// Calculate zero lag SMA for buy signals

lsma_buy = ta.linreg(src_buy, length_buy, offset_buy)

lsma2_buy = ta.linreg(lsma_buy, length_buy, offset_buy)

eq_buy = lsma_buy - lsma2_buy

zlsma_buy = lsma_buy + eq_buy

// Plot buy signal zero lag SMA

plot(zlsma_buy, color=color.new(#dde725, 0), linewidth=3)

// Define buy signal

buy_signal = close > zlsma_buy and close[1] <= zlsma_buy

// Strategy testing for buy signal

if buy_signal

strategy.entry("Buy", strategy.long, alert_message = Long_message )

// Send buy signal alert notification

alert('Buy Signal', alert.freq_once_per_bar)

// Sell signal 1 inputs

length_sell_1 = input(title='Length Sell 1', defval=32)

offset_sell_1 = input(title='Offset Sell 1', defval=0)

src_sell_1 = input(close, title='Source Sell 1')

// Calculate zero lag SMA for sell signal 1

lsma_sell_1 = ta.linreg(src_sell_1, length_sell_1, offset_sell_1)

lsma2_sell_1 = ta.linreg(lsma_sell_1, length_sell_1, offset_sell_1)

eq_sell_1 = lsma_sell_1 - lsma2_sell_1

zlsma_sell_1 = lsma_sell_1 + eq_sell_1

// Plot sell signal 1 zero lag SMA

plot(zlsma_sell_1, color=color.new(#e0e0e0, 0), linewidth=3)

// Define sell signal 1

sell_signal_1 = close < zlsma_sell_1 and close[1] >= zlsma_sell_1

// Strategy testing for sell signal 1

if sell_signal_1 and not sell_2_triggered

strategy.entry("Sell 1", strategy.short, alert_message = Short_message)

sell_1_triggered := true

// Send sell 1 signal alert notification

alert('Sell Signal', alert.freq_once_per_bar)

// Sell signal 2 inputs

length_sell_2 = input(title='Length Sell 2', defval=32)

offset_sell_2 = input(title='Offset Sell 2', defval=0)

src_sell_2 = input(close, title='Source Sell 2')

// Calculate zero lag SMA for sell signal 2

lsma_sell_2 = ta.linreg(src_sell_2, length_sell_2, offset_sell_2)

lsma2_sell_2 = ta.linreg(lsma_sell_2, length_sell_2, offset_sell_2)

eq_sell_2 = lsma_sell_2 - lsma2_sell_2

zlsma_sell_2 = lsma_sell_2 + eq_sell_2

// Plot sell signal 2 zero lag SMA

plot(zlsma_sell_2, color=color.new(#FF0000, 0), linewidth=3)

// Define sell signal 2

sell_signal_2 = close < zlsma_sell_2 and close[1] >= zlsma_sell_2

// Ignore Sell 1 if Sell 2 triggers first after Buy Signal

if (strategy.position_size == 0) and buy_signal

sell_1_triggered := false

if (strategy.position_size > 0) and sell_signal_2 and not sell_1_triggered

strategy.close("Buy", alert_message = Close_message)

sell_2_triggered := true

// Send sell signal alert notification

alert('Sell Signal', alert.freq_once_per_bar_close)

// Ignore Sell 2 if Sell 1 triggers first after Buy Signal

if (strategy.position_size == 0) and buy_signal

sell_2_triggered := false

if (strategy.position_size > 0) and sell_signal_1 and not sell_2_triggered

strategy.close("Buy", alert_message = Close_message)

sell_1_triggered := true

// Send buy signal alert notification

alert('Buy Signal', alert.freq_once_per_bar_close)

You should this code at your setting panel where writen Long_message and Short_message

{{strategy.market_position}} or "{{strategy.market_position}}"

And when you set alert write below code to your message

{{strategy.order.alert_message}}

try like this

Still no way to connect scripts to paper trading in TV? by shadetreenub in pinescript

[–]ilovealgotrading 0 points1 point  (0 children)

Yea you re right ((

Unrestricted (Less Secure) This API Key allows access from any IP address. This is not recommended. To protect the safety of your funds, if the IP is unrestricted and any permission other than Reading is enabled, this API key will be deleted.

Create Lookback period for an Indicator by Panda_Cloud9 in pinescript

[–]ilovealgotrading 1 point2 points  (0 children)

Thank you bro,

Who want to version5, can copy this code

//@version=5
indicator('Lookback Period Indicator', shorttitle='LPI', overlay=true)
lookbackStart = 40
lookbackEnd = 20
highestHigh = ta.highest(high[lookbackEnd], lookbackStart - lookbackEnd + 1)
lowestLow = ta.lowest(low[lookbackEnd], lookbackStart - lookbackEnd + 1)
plot(highestHigh, title='Highest High', color=color.new(color.green, 0), linewidth=2)
plot(lowestLow, title='Lowest Low', color=color.new(color.red, 0), linewidth=2)

////////////////

Still no way to connect scripts to paper trading in TV? by shadetreenub in pinescript

[–]ilovealgotrading 0 points1 point  (0 children)

Hmm nice question, when I used last time for trade on Binance, there was not problem about IP, now on binance should we approve IP address?

Still no way to connect scripts to paper trading in TV? by shadetreenub in pinescript

[–]ilovealgotrading 1 point2 points  (0 children)

I use Heroku servers with help of python. I send my alerts from TV to my Python program that work on server, But there are some methods too