I need a PINESCRIPT expert to edit my trading view stratergy
$10-30 AUD
Fermé
Publié il y a plus de 4 ans
$10-30 AUD
Payé lors de la livraison
I have a script writen in pinescript which is similar to pythoni believe, I need the script to only set a buy condition once the price has risen by 5% this is all on a platform called trading view the code for my currernt strat/script in down below:
//@version=2
strategy("EMA Long Only Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
len = input(21, type=integer, minval=1, title="Length")
price = sma(close, 2)
average = ema(close, len)
diff = atr(len)
bull_level = average + diff
bear_level = average - diff
bull_cross = crossover(price, bull_level)
bear_cross = crossover(bear_level, price)
[login to view URL]("Buy", [login to view URL], when=bull_cross)
[login to view URL]("Buy", when=bear_cross) //[login to view URL]("Sell", [login to view URL], when=bear_cross)
plot(price, title="price", color=green, transp=50, linewidth = 4)
plot(average, title="average", color=red, transp=50, linewidth = 4)
a1 = plot(bull_level, title="bull", color=red, transp=50, linewidth = 1)
a2 = plot(bear_level, title="bear", color=red, transp=50, linewidth = 1)
fill(a2, a1, color=red, transp=95)
Hi,
I am Sourabh Jain, I am interested in the work. I have written several pinescript strategies on tradingview platform. When you say , "price has risen by 5%", do you mean above EMA (represented by variable average), please clarify this one. I can finish it within a day.
If you are interested, I am available.
Sourabh
Hi,
I'm a software developer with focus on metatrader platform.
I've got many years experience both in trading and coding.
Programming languages - MQL4/5, AFL, PineScript.
Hi ! Here is the quick and dirty solution: bull_level = (average + diff) * 1.05. Of course, programming this PROPERLY would mean setting up a variable, say, MarginOfError and setting this to 5. SO, your code would be something like this: Margin Of Error=5 and then bull_level = (average + diff) * (1.+(MarginOfError / 100))
Hope this helps !
... and if it does I hope you're fair as well and send me the money !
Kind regards from Munich, Germany
Heiner