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)
strategy with EMA and range - comaprison of codes in MultiCharts /.NET / AmiBroker
I'm doing some comparsion between possibilities (long of the code in some platforms) for strategy with rules:
- We open long positions when the current bar closes above the highest close of the preceding 10 bars. Short positions are initiated when the bar closes below the 10-bar lowest close.
- Long positions are closed when the bar crosses below the 50-period Exponential Moving Average (EMA). We exit short positions when the bar closes above this EMA.
- We use two inputs to set the EMA length and the number of bars that the highest and lowest close is calculated on.
I started coding this in EasyLanguage for MultiCharts. I'm newbie with this language (1 day of exp.). My code:
This same strategy is coded for MultiCharts.NET and present on tradingcode.net with length 103 lines in C#.
My working code for AmiBroker (32 lines of the code):
-- --
I will be greatful for finishing my code for MultiCharts, so I will have full picture of length of the code. Thanks a lot!