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)
DefineGlobalColor("Bullish", Color.UPTICK);
DefineGlobalColor("Neutral", Color.BLUE);
DefineGlobalColor("Bearish", Color.DOWNTICK);
AssignPriceColor(if !paintBars then Color.CURRENT else if GreenPrice then globalColor("Bullish") else if RedPrice then globalColor("Bearish") else globalColor("Neutral"));
Please help!
Thanks and best wishes for your weekend!
600
Can you help answer these questions from other members on NexusFi?
I do not recognize this as EasyLanguage code. In addition, a strategy / signal in EasyLanguage has code to do: buy, sell, etc.
It is obvious to me that you haven't spent much time on this before posting on this forum. I would suggest that you do some basic research. A 4 second search i.e. typing, gave me this link: https://www.multicharts.com/discussion/viewtopic.php?t=2679
Do some cut and paste, compile and start fixing any compilation errors (if any).
I was going to post the same - as well as mentioning that this is a custom job and there are plenty of 3rd party EL specialists (found also searching) that can do this ... for a price.
Like our other forum fellas said, it seems your code still need a bit a rework. It does not look like a EL coding as is. Usually EL codes need to have the following structure and common statements:
Inputs: inputname(defaultvalue);
Variables: variablename(intialvalue);
Arrays: arrayname[arraysize](intialvalue);
If <true/false expression> then begin <EL statement> end;
Plot1(numericvalue);
Alert(alert string);
Buy next bar at Market;
Sell Short next bar at Market;
For <variablename> = 1 to <num> then begin <EL statement> end;
Print(expression list);
Commentary(expression list);
Etc. It also uses specific wording called "reserve words" in the code to start and/or finish statements, like variables assignment statements, comments and other.
Have a look at the two EL docs attached in case you had not see them before so you can a better idea of the structure, type of statement and language (reserved words) you can use.
On EL Essentials go to page 93 to check the basic strategy code structure outlined their as an example.
You can also get good information and access to webinars and other training materials at: https://www.youcantrade.com. You can sign up for free and get access to some of their EL material for a limited time or subscribe for $99/mo.
I don't speak .net but it looks fairly easy to see what this is trying to do. An EMA, MACD and MACDHist variable with bullish and bearish conditions. Its a paintbar indicator. I threw this together in 2 minutes. I do suggest you learn easylanguage though if you want to build on this or test other ideas.
So it would be like this. Just enable alerts for the study. Currently it would alert at every bar. If you only want it to alert when it goes from bullish to bearish or neutral to directional you could record the direction in a variable then change it in the if statement. I highly suggest you spend some time trying to digest what is going on here and it won't take too long for you to make some simple additions.
inputs:
length(13);
vars:
MyEMA(0),
MyMACD(0),
MACDHist(0);
MyEMA = XAverage(close,length);
MyMACD = XAverage(close,12) - XAverage(close,26);
MACDHist = MyMACD - XAverage(MyMACD,9);
Value1 = High;
Value2 = Low;
if MyEMA > MyEMA[1] and MACDHist > MACDHist[1] then begin
PlotPaintBar( Value1, Value2, "Plot", Cyan ) ;
Alert("Bullish");
end
else if MyEMA < MyEMA[1] and MACDHist < MACDHist[1] then begin
So it would be like this. Just enable alerts for the study. Currently it would alert at every bar. If you only want it to alert when it goes from bullish to bearish or neutral to directional you could record the direction in a variable then change it in the if statement. I highly suggest you spend some time trying to digest what is going on here and it won't take too long for you to make some simple additions.
inputs:
length(13);
vars:
MyEMA(0),
MyMACD(0),
MACDHist(0);
MyEMA = XAverage(close,length);
MyMACD = XAverage(close,12) - XAverage(close,26);
MACDHist = MyMACD - XAverage(MyMACD,9);
Value1 = High;
Value2 = Low;
if MyEMA > MyEMA[1] and MACDHist > MACDHist[1] then begin
PlotPaintBar( Value1, Value2, "Plot", Cyan ) ;
Alert("Bullish");
end
else if MyEMA < MyEMA[1] and MACDHist < MACDHist[1] then begin
So it would be like this. Just enable alerts for the study. Currently it would alert at every bar. If you only want it to alert when it goes from bullish to bearish or neutral to directional you could record the direction in a variable then change it in the if statement. I highly suggest you spend some time trying to digest what is going on here and it won't take too long for you to make some simple additions.
inputs:
length(13);
vars:
MyEMA(0),
MyMACD(0),
MACDHist(0);
MyEMA = XAverage(close,length);
MyMACD = XAverage(close,12) - XAverage(close,26);
MACDHist = MyMACD - XAverage(MyMACD,9);
Value1 = High;
Value2 = Low;
if MyEMA > MyEMA[1] and MACDHist > MACDHist[1] then begin
PlotPaintBar( Value1, Value2, "Plot", Cyan ) ;
Alert("Bullish");
end
else if MyEMA < MyEMA[1] and MACDHist < MACDHist[1] then begin
PlotPaintBar( Value1, Value2, "Plot", Magenta ) ;
Alert("Bearish");
end ;
i tried to make a strategy out of it, is it correct?