EasyLanguage Programmers! I need your HELP! - futures io
futures io



EasyLanguage Programmers! I need your HELP!


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one sixhundread with 8 posts (0 thanks)
    2. looks_two artisanpro with 5 posts (2 thanks)
    3. looks_3 ShadowFox with 4 posts (5 thanks)
    4. looks_4 SunTrader with 1 posts (2 thanks)
      Best Posters
    1. looks_one SunTrader with 2 thanks per post
    2. looks_two acosta1709 with 2 thanks per post
    3. looks_3 ShadowFox with 1.3 thanks per post
    4. looks_4 artisanpro with 0.4 thanks per post
    1. trending_up 471 views
    2. thumb_up 11 thanks given
    3. group 5 followers
    1. forum 18 posts
    2. attach_file 4 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

EasyLanguage Programmers! I need your HELP!

(login for full post details)
  #1 (permalink)
sixhundread
Vienna and Austria
 
 
Posts: 27 since Jul 2021
Thanks: 19 given, 6 received

I am new to EasyLanguage and I tried my best, but I cant get it done by now.

The code should be a strategy witch uses the Elder Impulse System.

input length = 13;
input paintBars = yes;

def EMA = ExpAverage(close, length);
def MACD = ExpAverage(close, 12) - ExpAverage(close, 26);
def MACDHist = MACD - ExpAverage(MACD, 9);
def GreenPrice = EMA > EMA[1] and MACDHist > MACDHist[1];
def RedPrice = EMA < EMA[1] and MACDHist < MACDHist[1];

plot Bullish = GreenPrice;
plot Neutral = !GreenPrice and !RedPrice;
plot Bearish = RedPrice;

Bullish.SetDefaultColor(Color.UPTICK);
Bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
Bullish.SetLineWeight(3);
Bullish.hide();
Neutral.SetDefaultColor(Color.BLUE);
Neutral.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
Neutral.SetLineWeight(3);
Neutral.hide();
Bearish.SetDefaultColor(Color.DOWNTICK);
Bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
Bearish.SetLineWeight(3);
Bearish.hide();

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

Reply With Quote

Can you help answer these questions
from other members on futures io?
For the experts of Metastock
Platforms and Indicators
MacdBB V402 NT804 + gradient + pullback not working on N …
NinjaTrader
NinjaTrader Charts and TorS feed?
Platforms and Indicators
Eurex Denali vs dxFeed
Sierra Chart
TradingView help in improving Anchored Vwap
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on futures io
How quickly do algos go bad?
76 thanks
Question about intraday margins
61 thanks
Avoiding Account Killing Freight Trains
24 thanks
How would you annotate this chart?
17 thanks
ZombiePack3 Indicators
14 thanks
 
(login for full post details)
  #2 (permalink)
artisanpro
toronto canada
 
 
Posts: 11 since May 2021
Thanks: 6 given, 4 received

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).

Reply With Quote
The following 2 users say Thank You to artisanpro for this post:
 
(login for full post details)
  #3 (permalink)
SunTrader
Boca Raton, FL
 
 
Posts: 168 since Nov 2018
Thanks: 43 given, 124 received


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.

Reply With Quote
The following 2 users say Thank You to SunTrader for this post:
 
(login for full post details)
  #4 (permalink)
 acosta1709 
Sydney, Australia
 
Experience: Beginner
Platform: TrStation,TrView,MCharts
Broker: FXCM, TradingStation
Trading: Futures, FX, stocks, crypto
 
acosta1709's Avatar
 
Posts: 5 since Jun 2021
Thanks: 0 given, 4 received

Hey 600,

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.

Also. try to get more info from the following websites:
https://community.tradestation.com/Discussions/Topic.aspx?Topic_ID=112042
https://www.tradestation.com:443/promo/easylanguage-boot-camp/?_ga=2.245519751.289150193.1625277676-1032257533.1612590524
Obs.: you may need to open or have an account with TradeStation to access these websites.

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.

Hope that helps.

Attached Files
Register to download File Type: pdf EasyLanguage - Functions and Reserved Words.pdf (2.58 MB, 2 views)
Register to download File Type: pdf EasyLanguage-Essentials.pdf (6.79 MB, 1 views)
Reply With Quote
The following 2 users say Thank You to acosta1709 for this post:
 
(login for full post details)
  #5 (permalink)
 ShadowFox 
CO/USA
 
Experience: Intermediate
Platform: TradeStation, Multicharts
Trading: Stocks, Futures
 
ShadowFox's Avatar
 
Posts: 88 since Jun 2020
Thanks: 57 given, 126 received

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.

 
Code
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 ) ;
end else if MyEMA < MyEMA[1] and MACDHist < MACDHist[1] then begin
PlotPaintBar( Value1, Value2, "Plot", Magenta ) ;
end ;

Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to ShadowFox for this post:
 
(login for full post details)
  #6 (permalink)
sixhundread
Vienna and Austria
 
 
Posts: 27 since Jul 2021
Thanks: 19 given, 6 received


ShadowFox View Post
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.

 
Code
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 ) ;
end else if MyEMA < MyEMA[1] and MACDHist < MACDHist[1] then begin
PlotPaintBar( Value1, Value2, "Plot", Magenta ) ;
end ;

thanks for that!

i got a paintbar of this before, I need an indicator witch i can add to a list, to get a alert.

Reply With Quote
 
(login for full post details)
  #7 (permalink)
 ShadowFox 
CO/USA
 
Experience: Intermediate
Platform: TradeStation, Multicharts
Trading: Stocks, Futures
 
ShadowFox's Avatar
 
Posts: 88 since Jun 2020
Thanks: 57 given, 126 received


sixhundread View Post
thanks for that!

i got a paintbar of this before, I need an indicator witch i can add to a list, to get a alert.

Just add the following code for alerts in the if statements

Alert("Bullish");

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.

 
Code
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 ;

Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to ShadowFox for this post:
 
(login for full post details)
  #8 (permalink)
sixhundread
Vienna and Austria
 
 
Posts: 27 since Jul 2021
Thanks: 19 given, 6 received


ShadowFox View Post
Just add the following code for alerts in the if statements

Alert("Bullish");

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.

 
Code
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 ;



thank you a lot SHADOWFOX!


thank you for teaching me, its really easy!

Reply With Quote
 
(login for full post details)
  #9 (permalink)
sixhundread
Vienna and Austria
 
 
Posts: 27 since Jul 2021
Thanks: 19 given, 6 received


ShadowFox View Post
Just add the following code for alerts in the if statements

Alert("Bullish");

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.

 
Code
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?



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 marketPosition = 0 and MyEMA > MyEMA[1] and MACDHist > MACDHist[1] Then
Buy next bar at Open;


if marketposition = 1 and MyEMA < MyEMA[1] and MACDHist < MACDHist[1] then
Sell next bar at Open;

if Marketposition = 0 and MyEMA < MyEMA[1] and MACDHist < MACDHist[1] then
Sellshort next bar at open;

if Marketposition = -1 and MyEMA < MyEMA[1] and MACDHist < MACDHist[1] then
Buy to Cover next bar at Open;

Reply With Quote
 
(login for full post details)
  #10 (permalink)
artisanpro
toronto canada
 
 
Posts: 11 since May 2021
Thanks: 6 given, 4 received


Yes, it is correct - it compiles and makes money as seen on the attachment showing the last 500 days of USDCAD

NOTE: see caveat on next post

USDCAD 500 days 2021-07-19_1523

Attached Thumbnails
Click image for larger version

Name:	USDCAD 500 days  2021-07-19_1523.jpg
Views:	18
Size:	367.7 KB
ID:	315196  
Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > EasyLanguage Programmers! I need your HELP!


Last Updated on July 20, 2021


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing

A Transparent Glimpse Into a Prop Traders Life w/Chris Gray @ Earn2Trade

Elite only
 

Our 12-year anniversary w/ $$,$$$ prizes (check soon)

August
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts