Market Facilitation Index
0
0
dare2
2013-01-26 16:44:23
Would someone who is savvy in coding please be so kind to translate the following Amibroker code for this indicator into the Quantshare language?
Thank you,
Darrell Allen
function MassIndex( period1, period2 )
{
diff = H - L;
ediff = EMA( diff, period1 );
eediff = EMA( ediff, period1 );
return Sum( ediff/eediff, period2 );
}
Plot( MassIndex( Param("Period 1", 9, 2, 100 ), Param("Period 2", 25, 2, 100 ) ),
_DEFAULT_NAME(), ParamColor("Color", ColorCycle ) );
allan nathan
2013-01-27 22:09:43
0
I will try to code this up for you...What confuses me are the { and }...
Do you know what significance they have?
Allan
dare2
2013-01-27 23:48:52
0
No I do not Allan. I will try and find out and let you know. Any help will be appreciated.
Darrell
dare2
2013-01-28 01:48:51
0
Apparently, "curly brackets" are used to denote the beginning and ending of sequencing statements.
Darrell
QuantShare
2013-01-28 16:59:14
0
The Mass Indicator is already available in the sharing server:
Mass Index Indicator
(by bug man,
uploaded several months ago)
No notes
dare2
2013-01-28 17:16:06
0
I do not want the Mass Indicator. I am looking for the Market Facilitation Index.
Darrell
clonex
2013-01-28 18:52:28
0
i will create Market Facilitation today for you
QuantShare
2013-01-28 19:28:38
0
The Mass Indicator has exactly the same formula as the one you posted above.
dare2
2013-01-28 21:03:58
0
You are correct I posted the wrong formula. The following is the Market Facilitation Index:
function MarketFacilitationIndex()
{
return ( High - Low )/Volume;
}
mfac = MarketFacilitationIndex();
rm = ROC( mfac, 1 );
rv = ROC( Volume, 1 );
Color = IIf( rm > 0 AND rv > 0, colorGreen,
IIf( rm < 0 AND rv < 0, colorBrown,
IIf( rm > 0 AND rv < 0, colorBlue,
IIf( rm < 0 AND rv > 0, ColorRGB(255,128,192), colorLightGrey ) ) ) );
Plot( mfac, _DEFAULT_NAME(), Color, ParamStyle("Style", styleHistogram | styleThick, maskHistogram ) );
dare2
2013-01-28 21:04:39
0
Thanks Clonex.
dare2
2013-01-28 21:52:16
0
My apologies for posting the wrong formula.
Darrell
QuantShare
2013-02-04 11:14:15
0
Here is the formula of the Market Facilitation Index:
mfac = (high - low) / volume;
rm = roc( mfac, 1);
rv = roc(volume, 1);
Plot(mfac, "Market Facilitation Index", colorLightGray, ChartBar);
UpdateColor(rm > 0 AND rv > 0, colorGreen);
UpdateColor(rm < 0 AND rv < 0, colorBrown);
UpdateColor(rm > 0 AND rv < 0, colorBlue);
UpdateColor(rm < 0 AND rv > 0, colorLightCoral);
dare2
2013-02-04 14:11:54
0
Thanks, but it will not compile. I am getting 36 errors?
Darrell
QuantShare
2013-02-04 20:12:03
0
You should paste this formula in the editor that appears after right click on a chart/pane then selecting "Edit Formula".
No more messages
0
Copyright © 2024 QuantShare.com
Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.