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)
st = SuperTrend(ATRLength, ATRMult, Strength, strend);
If st cross below close then buy ("buy") next bar at market;
if st cross above close then Sell ("sell") next bar at market;
***********************
This works, except for the fact that, at times, even though close crosses supertrend (from above or below), the Supertrend does not change the side (which is a great thing). But,
because the way I coded (above), the strategy keeps buying & selling in this situations (as I posted in above pic). How do I control this / code in such a way that buy or sell happens only when the supertrend changes side and not just close crossing Supertrend.
Hi Mike, I'm looking at the SuperTrend function you posted last year.
This is the part that I need some help:
if flag = 1 then up = avg + ATR;
if flagh = 1 then dn = avg - ATR;
1)what are flag and flagh supposed to do?
2)you already defined "up = avg + ATR" and "dn = avg - ATR" earlier in the indicator. Why do we have to repeat it here?
Thanks to Mike and others. This is a great thread. SuperTrend is one of my favorite indicator. I converted the anaSuperTrendM1 indicator (also from futures.io (formerly BMT)) to Easy Language. Hope it is ok.
Thanks Mike. futures.io (formerly BMT) is the greatest forum I ever know. Certainly glad I can contribute. I am new to EL and trading. Having programming background, writing code is easy, but learning trading is hard.
Feel free to let me know if there is any programming need, could be a good exercise for me.