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)
I found this code from about 10 years ago. Originally it didn't work because i think i had the function in the wrong place. I would be using this strategy when I already have an existing position. I would like to add a Stop to the strategy so I could exit the position if the Hull MA changes direction or the Stop is hit - which ever comes 1st.
{
Original equation is:
---------------------
waverage(2*waverage(close,period/2)-waverage(close,period), SquareRoot(Period)
Implementation below is more efficient with lengthy Weighted Moving Averages.
In addition, the length needs to be converted to an integer value after it is halved and
its square root is obtained in order for this to work with Weighted Moving Averaging
}
you could add the build in Stop Loss strategy together with your strategy to the same chart. This way the stop could exit an open position that the hull strategy created.
The up and down signals show up on the chart and I can run backtests but the strategy isn't executing any trades on the OEC Trader demo platform. Called tech support and they said something is wrong with the script then.
Apparently I had some of the boxes in the Strategy Manager wrong. Looks like the strategy works. As I said I would be using this strategy to exit existing positions and would only want it executed once. So then should i use " If entriestoday=0 then buy or sell " ?
depending on how entriestoday works within OEC, this might allow one trade per day. If you want the order to be executed just once, you could use a boolean variable that you set to true when you declare and initialize it. Then you only allow your orders when this variable is true and set it to false when you trigger your order. This would only allow the order to be triggered once.