Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Hello. I am trying to code a time-out stop loss.
Suppose a system generates a buy signal after price crossover a specific moving average.
If after that buy signal, the higher of next x days is lower than the high of the day of the buy signal, then close position at close of that day (x).
Is it possible using N-bar stop loss function? Can you help me with coding?
Thank you!
Can you help answer these questions from other members on NexusFi?
You wanna exit at profit target I guess for example x-ticks above high of entry bar. And in addition you want to add a time stop. So for example it's one Applystop with stoptypeprofit and another one with stoptypenbar. Or you can create stops via looping.
Hello. I am trying to add an additional exit rule to the classic MA cross over price system. Maybe an example can clarify this exit rule (I've chosen 3 days, but the idea should be adaptable to x days):
day 0 (signal): high 11, low 8.5, close 9.5, MA 9 open long (because close>MA)
day 1: high 10.5, low 7.5, close 8.8, MA 8.5 keep long position (because close>MA)
day 2: high 10.7, low 8, close 9, MA 8.8 keep long position (because close>MA)
day 3: high 10.2, low 7.8, close 9.5, MA 9 close position (because higher from day 1 to day 3 is lower than high of day 0).
On day 3, altough close is ABOVE MA, I would like to EXIT position (sell), because higher from day 1 to day 3 (10.7) is LOWER than high of day 0 (11).
I only need help on coding the lower higher exit rule (time out exit rule).
Thank you.