Click here to Login





                                                   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





Mass Index Indicator (by bug man, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads Notes Report an item

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



allan nathan
2013-02-05 18:27:09

  0

Works fine for me


allan nathan
2013-02-05 18:31:49

  0

Works fine for me


No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
MICEX Index - Market Data
Ratio of Equal-weighted to Market capitalization-weighted S&P 500...
Market Composite Index based on the Sharpe Ratio
FTSE NAREIT US Market Real Estate Index Series - REIT Indices
Volume Trend Index - Market Indicator

How-to Lessons
How to filter stocks in a market composite
How to associate an index with a list of stocks
How to get stocks for a particular index using the global script
How to add future bars to plan for market scenarios
How to display the bar index of a stock on a chart

Related Forum Threads
Historical intraday data for the AEX index
How QuantShare interacts with market circuit breakers?
Chart Pattern Index problem
Unable to downlod Hang Seng index historical prices
add symbols to a market

Blog Posts
Short Index - Part 1
3 Market Indicators based on Fundamental Data
Fundamental analysis: How to track economic indicators in the For...
Display several stock market charts with one click
Fundamental Screen based on Stock price, ROI and Market capitaliz...









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



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.