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)
My code below trades based on EMA crosses. When I plot the EMA from the strategy onto the chart the 34 ema doesn't look the same as the 34 ema that is built into MultiCharts under the drawings. Is there something wrong with my code?
They should be the same functions, but remember that exp avg theoretically includes ALL previous data. So, if your starting points for calculation are different, you will get different results in ema calculations.
I suggest printing out the values in both MC and TS, and then it might be easier to debug.
My bad, I thought you were comparing Tradestation and Multicharts results. It sounds like you are comparing Multicharts Analysis (Plot) with Multicharts Strategies.
I do not use MC, but maybe showing you how Tradestation does it will help...
In Tradestation, if you go to Format Analysis technique, you can adjust the number of bars a study references.
Your first reply helped me figure it out actually. I changed the max bars back and it worked out. You know anything about candlestick trading? I'm trying to add bullish engulfings as a requirement for entry in this strategy any ideas?
It does but I can't figure out how to use it in my code. The code for the engulfing function is :
Inputs: Len(Numeric);
condition1 = Average(Close, Len) < Average(Close, Len)[1] AND Close > Open AND Close[1] < Open[1]
AND Close > Open[1] AND Open < Close[1];
If condition1 Then
BullishEngulfing = True
Else
BullishEngulfing = False;