Another EL Learning Exercise - EasyLanguage Programming | futures io social day trading
futures io futures trading

Another EL Learning Exercise
Updated: Views / Replies:504 / 1
Created: by TrendFirst Attachments:0

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Thread Tools Search this Thread

Another EL Learning Exercise

  #1 (permalink)
Trading Apprentice
Calgary AB Canada
Futures Experience: Intermediate
Platform: Multicharts, IQFeed
Broker/Data: Interactive Brokers, Fidelity, Questrade
Favorite Futures: Forex, Options, Futures, Stock
Posts: 8 since Jan 2016
Thanks: 2 given, 0 received

Another EL Learning Exercise

I'm continuing down the path of learning EL, starting by exploring some of the indicators included with MultiCharts. When I saw one labeled "Elder Triple Screen", I thought "Well this might be an easier one for me to understand, since I have Elder's original book". So I started reviewing it.

While I'm thankful that MC included indicator code with the software package, I have to say that their Elder Triple Screen is, well, not really a triple screen. The original triple screen worked on three time frames, hence the name. The MC Triple Screen works on one time frame. It does use two screens, the slope of an EMA line and the slope of the MACD Histogram, to paint bars.

I'm not an expert on the history of EL by any means, but it seems to be coded with an older version of EL. I also found their variable-naming convention confusing. Here is my code, using different nomenclature that makes more sense to me.

{ ------------------------------------------------------------------------------------------
 A bit of practice here, along with "correcting" one of the existing MC indicators,
 which they called Elder Triple Screen.  It's not - it's not even close to the
 original ETS.  So I'm renaming it and re-coding it, using nomenclature that makes
 more sense to me.  MC used variable names that didn't seem logical to me.
 I'm calling this the MACD_EMA Double Screen.  One time frame, two screens. Next step
 will be doing a proper Elder Triple Screen that actually uses three time frames.
 How this works:
 If MACD Histogram slope is up and EMA slope is up, bars are painted green.
 If MACD Histogram slope is down and EMA slope is down, bars are painted red.
 If the slopes point in opposite directions, bars are painted yellow.
 ------------------------------------------------------------------------------------------- }
 	UpColor   (Green),      // Paintbar colors used
 	DownColor (Red),
 	FlatColor (Yellow),
 	FastEMAPeriod (12),     // Fast period used to calculate MACD
 	SlowEMAPeriod (26),     // Slow period used to calculate MACD
 	SignalPeriod   (9),     // EMA period used for calculating the Signal Line
 	EMAPeriod     (26),     // Exponential moving average period for calculating EMA slope
 	MACDPrice     (Close);  // Closing price is used in the calculations
 	MACDLine      (0),      // MACD line, also known as fast line, usually solid color
 	SignalLine    (0),      // Signal line, also known as slow line, usually dashed line
 	Histogram     (0),      // Histogram bars, which are MACDLine - SignalLine
 	EMALine       (0),      // Exponential Moving Average
 	PlotColor     (0);
 EMALine    = Xaverage (Close, EMAPeriod);
 MACDLine   = (MACD (MACDPrice, FastEMAPeriod, SlowEMAPeriod));
 SignalLine = Xaverage (MACDLine, SignalPeriod);
 Histogram  = MACDLine - SignalLine;
 If (( EMALine > EMALine[1]) and (Histogram > Histogram[1])) then begin
 	PlotColor    = UpColor;
 Else If (( EMALine < EMALine[1]) and (Histogram < Histogram[1])) then begin
 	PlotColor    =  DownColor;
 Else If (((EMALine <= EMALine[1]) and (Histogram >= Histogram[1]))
	or (EMALine >= EMALine[1]) and Histogram <= Histogram[1]) then begin
	PlotColor    = FlatColor;
 PlotPaintBar (High, Low, Open, Close, "MACD_EMA Double Screen", PlotColor);

And here is the old code for comparison:

{ 27499 }

{Title:  Alexander Elder Triple Screen: Initial Screen for Trading Prospects


1.  Paint the bar green when the EMA and the MACD histogram each turn up.       Possible long setup.
2.  Paint the bar red when the EMA and the MACD histogram each turn down.      Possible short setup.
3.  Paint the bar yellow when the EMA and the MACD go in different directions.  No trade setup.


      LongColor(Green),         {Paintbar color for possible long}
      ShortColor(Red),         {Paintbar color for possible short}
      NoActionColor(Yellow),      {Paintbar color for noaction}
      MACDPrice(Close),         {MACD Price value used in calculation}
      MACDExpMALength(9),      {MACD Smoothing Exponential Moving Average Length}
      MACDFastLength(12),      {MACD Fast length value used in calculation}
      MACDSlowLength(26),      {MACD Slow length value used in calculation}

      MALength(26);         {Moving average length}

      AlertMessage(""),         {Content of Alert Message}
      PlotColor(0),         {Color to be plotted}
      PlotMessage(""),         {Message to be plotted}

      MACDDiff(0),         {MACD Difference used to plot MACD histogram}
      MAValue(0),         {Current moving average value}
      MACDValue(0),         {Current MACD value}
      OldMACDDiff(0),         {Prior MACD Diff Value to which current will be compared}
      OldMACDValue(0),         {Prior MACD value to which current will be compared}

      OldMAValue(0);         {Prior Moving average value to which current will be compared}

      OldMAValue=MAValue;      {Capture old moving average value before calculating new}

      OldMACDDiff=MACDDiff;      {Capture old MACD Diff value before calculating new}
      OldMACDValue=MACDValue;      {Capture old MACD value before calculating new}
      MACDValue=MACD(MACDPrice, MACDFastLength,MACDSlowLength);
      MACDAvg=Xaverage(MACD(MACDPrice, MACDFastLength,MACDSlowLength),MACDExpMALength);
      MACDDiff=(MACDValue-MACDAvg);   {MACDDiff is the diffe between MACD  and MACD Exp Value}

      If ((MAValue > OldMAValue) and (MACDDiff > OldMACDDiff)) then
            PlotColor=LongColor ;

      If ((MAValue < OldMAValue) and (MACDDiff < OldMACDDiff)) then
            PlotColor=ShortColor ;

If ((MAValue <= OldMAValue) and (MACDDiff >= OldMACDDiff)) or ((MAValue >= OldMAValue) and (MACDDiff <= OldMACDDiff)) then

      PlotPaintBar(High,Low,Open,Close, "Elder Screen", PlotColor) ;
      Alert( AlertMessage ) ;

Reply With Quote
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


futures io > > > > > Another EL Learning Exercise

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

Wyckoff Hunting for Great Risk/Reward Ratio w/Gary Fullett

Elite only

Digging into the Details of iSystems w/Stage 5 & iSystems

Jun 5

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help With An EL Learning Exercise TrendFirst EasyLanguage Programming 6 March 19th, 2016 02:48 PM
Coin Flip Exercise Java Traders Hideout 8 December 29th, 2014 09:47 PM
Learning how to play guitar...reminds me of learning how to trade shodson Beginners and Introductions 10 September 16th, 2013 05:22 PM
My “Focus Meditation” Exercise AttitudeTrader Psychology and Money Management 13 July 17th, 2012 09:22 AM
Learning EL. Question Timot EasyLanguage Programming 13 May 12th, 2012 09:41 AM

All times are GMT -4. The time now is 10:08 AM.

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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
Page generated 2018-05-22 in 0.08 seconds with 19 queries on phoenix via your IP