Find Jobs
Hire Freelancers

Tweak a Pine script indicator for TradingView to plot buy arrows with alert conditions

$10-30 USD

Completed
Posted almost 6 years ago

$10-30 USD

Paid on delivery
I simply need someone to add a part to the end of the below script that adds upward buy arrows with 'buy' alert conditions for this Volatility Stop indicator. The main condition is that I don't want a green buy arrow to appear at every green cross, I only want it to appear once at the beginning of a run of green crosses / after each run of red crosses. Below is the code. Should be a 5 minute job to someone who knows Pine script. Not a big job as I am already providing the bulk of the code for this indicator. Also I have attached an image with an example of where I want the arrows to make things clearer. Thanks! //@version=3 study("Volatility Stop Custom", shorttitle="VStop", overlay=false) length = input(20) mult = input(2) atr_ = atr(length) max1=0.0 min1=0.0 is_uptrend_prev = false stop=0.0 vstop_prev=0.0 vstop1=0.0 is_uptrend=false is_trend_changed=false max_ = 0.0 min_ = 0.0 vstop=0.0 max1 := max(nz(max_[1]), close) min1 := min(nz(min_[1]), close) is_uptrend_prev := nz(is_uptrend[1], true) stop := is_uptrend_prev ? max1 - mult * atr_ : min1 + mult * atr_ vstop_prev := nz(vstop[1]) vstop1 := is_uptrend_prev ? max(vstop_prev, stop) : min(vstop_prev, stop) is_uptrend := close - vstop1 >= 0 is_trend_changed := is_uptrend != is_uptrend_prev max_ := is_trend_changed ? close : max1 min_ := is_trend_changed ? close : min1 vstop := is_trend_changed ? is_uptrend ? max_ - mult * atr_ : min_ + mult * atr_ : vstop1 plot(vstop, color = is_uptrend ? green : red, style=cross, linewidth=2)
Project ID: 17240732

About the project

1 proposal
Remote project
Active 6 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Bonjour cela me prendra 4minutes 59 secondes si cela vous convient. J'ai déjà effectuer la mise en place des fléches: [login to view URL]
$30 USD in 0 day
5.0 (5 reviews)
2.2
2.2

About the client

Flag of FRANCE
Moncrabeau, France
5.0
6
Payment method verified
Member since Feb 16, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.