Multiple MACD in EL - TradeStation | futures io social day trading
futures io futures trading


Multiple MACD in EL
Updated: Views / Replies:614 / 4
Created: by Saraf64 Attachments:1

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

Reply
 
Thread Tools Search this Thread
 

Multiple MACD in EL

  #1 (permalink)
Trading Apprentice
Los Angeles, CA, USA
 
Futures Experience: Advanced
Platform: TradeStation
Favorite Futures: Forex
 
Posts: 14 since Mar 2014
Thanks: 3 given, 0 received

Multiple MACD in EL

Hi! I am quite new at EL programming and would like to get help on creating a MACD indicator to plot two MACD's with their individual parameters in the same pane as one code. Thank you.

Reply With Quote
 
  #2 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

Hi Saraf64,

when using two individual MACDs in the same pane using the same scaling doesn't work for you, take a look at the build in MACD indicator code. Just duplicate the code and add a 2 to all inputs and variables in the duplication part of the code.
This would be a quick and dirty approach, but it would do what you have in mind.

Regards,
ABCTG


Saraf64 View Post
Hi! I am quite new at EL programming and would like to get help on creating a MACD indicator to plot two MACD's with their individual parameters in the same pane as one code. Thank you.


Reply With Quote
 
  #3 (permalink)
Trading Apprentice
Los Angeles, CA, USA
 
Futures Experience: Advanced
Platform: TradeStation
Favorite Futures: Forex
 
Posts: 14 since Mar 2014
Thanks: 3 given, 0 received


Hi ABCTG.

Thank you for your response. I (think) I tried your suggestion, but didn't get the result I was hoping for, but I believe you might have put me in the right direction. Let me explain my intention a little further. This is the beginning of a bigger plan for creating a strategy with multiple MACD's. Basically I have plotted multiple MACD's (with different parameters) in one pane (for visual purpose). I have done thorough studies of my system and although it's not the "Holy Grail", the results are quite astounding. Perhaps it is something that might interest you as well.

Please see the attached chart and give me your thoughts on it.

Thank you much
Saraf64



ABCTG View Post
Hi Saraf64,

when using two individual MACDs in the same pane using the same scaling doesn't work for you, take a look at the build in MACD indicator code. Just duplicate the code and add a 2 to all inputs and variables in the duplication part of the code.
This would be a quick and dirty approach, but it would do what you have in mind.

Regards,
ABCTG


Attached Thumbnails
Multiple MACD in EL-macd.jpg  
Reply With Quote
 
  #4 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

Saraf64,

it looks okay from the screenshot, but it's a possibility that the scaling is different for all three MACDs.
You can compare this to a study where two MACDs come out of one indicator.
 
Code
inputs:
	int FastLength( 12 ), { the shorter of the two exponential moving average
	 lengths used to calculate the MACD value, in bars }
	int SlowLength( 26 ), { the longer of the two exponential moving average
	 lengths used to calculate the MACD value, in bars }
	int MACDLength( 9 ), { the number of bars over which to exponentially average
	 the MACD value }
	int MACDDiff_Up_Color( Green ), { color to be used to plot positive values of
	 MACDDiff }
	int MACDDiff_Down_Color( Red ), { color to be used to plot negative values of
	 MACDDiff }
	int FastLength2( 24 ), { the shorter of the two exponential moving average
	 lengths used to calculate the MACD value, in bars }
	int SlowLength2( 52 ), { the longer of the two exponential moving average
	 lengths used to calculate the MACD value, in bars }
	int MACDLength2( 18 ), { the number of bars over which to exponentially average
	 the MACD value }
	int MACDDiff_Up_Color2( DarkGreen ), { color to be used to plot positive values of
	 MACDDiff }
	int MACDDiff_Down_Color2( DarkRed ); { color to be used to plot negative values of
	 MACDDiff }

variables:
	double MyMACD( 0 ),
	double MACDAvg( 0 ),
	double MACDDiff( 0 ),
	double HistogramColor( 0 ),
	double MyMACD2( 0 ),
	double MACDAvg2( 0 ),
	double MACDDiff2( 0 ),
	double HistogramColor2( 0 );
		
MyMACD = MACD( Close, FastLength, SlowLength ) ;
MACDAvg = XAverage( MyMACD, MACDLength ) ;
MACDDiff = MyMACD - MACDAvg ;
HistogramColor = iff( MACDDiff > 0, MACDDiff_Up_Color, MACDDiff_Down_Color ) ;

MyMACD2 = MACD( Close, FastLength2, SlowLength2 ) ;
MACDAvg2 = XAverage( MyMACD2, MACDLength2 ) ;
MACDDiff2 = MyMACD2 - MACDAvg2 ;
HistogramColor2 = iff( MACDDiff2 > 0, MACDDiff_Up_Color2, MACDDiff_Down_Color2 ) ;

Plot1( MyMACD, "MACD" ) ;
Plot2( MACDAvg, "MACDAvg" ) ;
Plot3( MACDDiff, "MACDDiff", HistogramColor ) ;
Plot4( MyMACD2, "MACD2" ) ;
Plot5( MACDAvg2, "MACDAvg2" ) ;
Plot6( MACDDiff2, "MACDDiff2", HistogramColor ) ;
Plot7( 0, "ZeroLine" )
Regards,
ABCTG

Reply With Quote
 
  #5 (permalink)
Trading Apprentice
Los Angeles, CA, USA
 
Futures Experience: Advanced
Platform: TradeStation
Favorite Futures: Forex
 
Posts: 14 since Mar 2014
Thanks: 3 given, 0 received

Thank you. As soon as I posted the last message, I went back and added the "2" that you had mentioned to wherever I thought it would make sense and I got the result I was looking for.


inputs: FastLength( 12 ), SlowLength( 26 ), MACDLength( 9 ) ;
variables: MyMACD( 0 ), MACDAvg( 0 ), MACDDiff( 0 ) ;

MyMACD = MACD( Close, FastLength, SlowLength ) ;
MACDAvg = XAverage( MyMACD, MACDLength ) ;
MACDDiff = MyMACD - MACDAvg ;

Plot1( MyMACD, "MACD" ) ;
Plot2( MACDAvg, "MACDAvg" ) ;
Plot3( MACDDiff, "MACDDiff" ) ;
Plot4( 0, "ZeroLine" ) ;

{ Alert criteria }
if MACDDiff crosses over 0 then
Alert( "Bullish alert" )
else if MACDDiff crosses under 0 then
Alert( "Bearish alert" ) ;

inputs: FastLength2( 48 ), SlowLength2( 104 ), MACDLength2( 9 ) ;
variables: MyMACD2( 0 ), MACDAvg2( 0 ), MACDDiff2( 0 ) ;

MyMACD2 = MACD( Close, FastLength2, SlowLength2 ) ;
MACDAvg2 = XAverage( MyMACD2, MACDLength2 ) ;
MACDDiff2 = MyMACD2 - MACDAvg2 ;

Plot5( MyMACD2, "MACD" ) ;
Plot6( MACDAvg2, "MACDAvg" ) ;
Plot7( MACDDiff2, "MACDDiff" ) ;
Plot8( 0, "ZeroLine" ) ;

{ Alert criteria }
if MACDDiff crosses over 0 then
Alert( "Bullish alert" )
else if MACDDiff crosses under 0 then
Alert( "Bearish alert" ) ;


That's Part 1 of the strategy. Let me know if you would be interested in working with me on this strategy. I believe the results will quite surprise you

Thanks a lot again
Saraf64




ABCTG View Post
Saraf64,

it looks okay from the screenshot, but it's a possibility that the scaling is different for all three MACDs.
You can compare this to a study where two MACDs come out of one indicator.
[Code]

Regards,
ABCTG


Reply With Quote

Reply



futures io > > > > Multiple MACD in EL

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestions on using multiple monitors when trading multiple instruments Rad4633 Tech Support 46 November 9th, 2014 07:08 PM
EL translation solotrader Sierra Chart 0 September 22nd, 2013 01:29 PM
How to Reference MACD-1 and MACD-2 in the Same Chart a2trader EasyLanguage Programming 3 July 21st, 2013 06:11 PM
MACD Cross_Above/Cross_Below in EL Arich EasyLanguage Programming 5 September 30th, 2012 10:28 AM
Looking for a simple MACD strategy. MACD Xover LONG, go LONG roshareid NinjaTrader Programming 2 April 11th, 2010 09:05 PM


All times are GMT -4. The time now is 12:08 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, 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
Page generated 2017-12-15 in 0.10 seconds with 20 queries on phoenix via your IP 54.226.34.209