I found the code for a SMI Stochastic Momentum Indicator and I have no clue how to add this code to a library or something so I can call it like I do iStochastic etc.
Anyone know how to do it.....
See attached SMI indicator for the source code....
Thanks
iSMI function needed
Moderator: moderators
- MarketSlayer
- rank: <50 posts
- Posts: 23
- Joined: Mon Aug 31, 2009 10:57 pm
- Reputation: 0
- Gender:
- Contact:
iSMI function needed
- Attachments
-
- MS SMI.mq4
- (3.89 KiB) Downloaded 217 times
Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.
Thank you for your support.
- rowdy
- rank: 150+ posts
- Posts: 157
- Joined: Fri Feb 20, 2009 1:22 pm
- Reputation: 1
- Location: Murfreesboro, Tennessee
- Gender:
Re: iSMI function needed
MarketSlayer wrote:I found the code for a SMI Stochastic Momentum Indicator and I have no clue how to add this code to a library or something so I can call it like I do iStochastic etc.
Anyone know how to do it.....
See attached SMI indicator for the source code....
Thanks
Shut down MT4. Move this file to the Program Files/MetaTrader4/Experts/Indicators folder. Restart MT4. You will see it show up in the custom indicators panel in MT4 Navigator. Drag and drop into chart.
If your question is about how to call it up in a program, then you need to use the iCustom function in mql4. Go to www.mql4.com for more details.
All I need is Supply and Demand
- MarketSlayer
- rank: <50 posts
- Posts: 23
- Joined: Mon Aug 31, 2009 10:57 pm
- Reputation: 0
- Gender:
- Contact:
Yes, my question is how to make it a function that I call and pass the same parameters to it, just like iStochastic etc. I would like to be able to retrieve this across time frames etc etc...I am not sure how to modify the code to call the data from different time frames. Can anyone help on this?
Thanks
Thanks
- rowdy
- rank: 150+ posts
- Posts: 157
- Joined: Fri Feb 20, 2009 1:22 pm
- Reputation: 1
- Location: Murfreesboro, Tennessee
- Gender:
MarketSlayer wrote:Yes, my question is how to make it a function that I call and pass the same parameters to it, just like iStochastic etc. I would like to be able to retrieve this across time frames etc etc...I am not sure how to modify the code to call the data from different time frames. Can anyone help on this?
Thanks
Slayer,
Use iCustom-
http://docs.mql4.com/indicators/iCustom
double val=iCustom(NULL, 0, "MS SMI",0,0); returns the current value for the white line on the current chart timeframe.
double val=iCustom(NULL, PERIOD_H1, "MS SMI",1,0); returns the current value for the red line on the H1 timeframe.
If you want to pass values, MS SMI uses four external inputs-
Period_Q
Period_R
Period_S
Signal
To Pass 5,6,7,2 on the M15 timeframe and get the value for the white line-
double val=iCustom(NULL, PERIOD_M15, "MS SMI",5,6,7,2,0,0);
All I need is Supply and Demand
- MarketSlayer
- rank: <50 posts
- Posts: 23
- Joined: Mon Aug 31, 2009 10:57 pm
- Reputation: 0
- Gender:
- Contact:
I did use that, thanks soo much, that was great to get to work finally....
One item I am struggling with is the hard coding of a pair/currency... I want to create a dashboard with a list of multiple pairs.
When I set the symbol ="EURUSD" it bombs.
double a = iCustom(symbol,i, "MS SMI", 5,6,7,2,0,0) ;// Fast Line
double b = iCustom(symbol,i, "MS SMI", 5,6,7,2,1,0) ; // Slow Line
Any ideas??
One item I am struggling with is the hard coding of a pair/currency... I want to create a dashboard with a list of multiple pairs.
When I set the symbol ="EURUSD" it bombs.
double a = iCustom(symbol,i, "MS SMI", 5,6,7,2,0,0) ;// Fast Line
double b = iCustom(symbol,i, "MS SMI", 5,6,7,2,1,0) ; // Slow Line
Any ideas??
Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.
Thank you for your support.
- rowdy
- rank: 150+ posts
- Posts: 157
- Joined: Fri Feb 20, 2009 1:22 pm
- Reputation: 1
- Location: Murfreesboro, Tennessee
- Gender:
MarketSlayer wrote:I did use that, thanks soo much, that was great to get to work finally....
One item I am struggling with is the hard coding of a pair/currency... I want to create a dashboard with a list of multiple pairs.
When I set the symbol ="EURUSD" it bombs.
double a = iCustom(symbol,i, "MS SMI", 5,6,7,2,0,0) ;// Fast Line
double b = iCustom(symbol,i, "MS SMI", 5,6,7,2,1,0) ; // Slow Line
Any ideas??
Not sure, make sure symbol is defined as a string. Try using "EURUSD" instead of the variable symbol in the iCustom and see if that works. Also, do a search of iCustom in www.mql4.com. Here is a thread that may offer some help-
http://forum.mql4.com/21870
All I need is Supply and Demand
- MarketSlayer
- rank: <50 posts
- Posts: 23
- Joined: Mon Aug 31, 2009 10:57 pm
- Reputation: 0
- Gender:
- Contact:
- MarketSlayer
- rank: <50 posts
- Posts: 23
- Joined: Mon Aug 31, 2009 10:57 pm
- Reputation: 0
- Gender:
- Contact:
Nice work my comrad....
I had to update one piece for my Forex.com platform/feed.
string q[] = {"EURUSDFXF","GBPUSDFXF","USDJPYFXF","EURJPYFXF","GBPJPYFXF","USDCHFFXF","USDCADFXF","NZDUSDFXF"};
I updated the suffix to the pair text label... ahhhhhh that was the missing link.
QUESTION - explain your letters...is it B=Buy, S=Sell, W=Wait??
Thanks again.
Great lesson learned here..
Slayer of the Markets....LOL
I had to update one piece for my Forex.com platform/feed.
string q[] = {"EURUSDFXF","GBPUSDFXF","USDJPYFXF","EURJPYFXF","GBPJPYFXF","USDCHFFXF","USDCADFXF","NZDUSDFXF"};
I updated the suffix to the pair text label... ahhhhhh that was the missing link.
QUESTION - explain your letters...is it B=Buy, S=Sell, W=Wait??
Thanks again.
Great lesson learned here..
Slayer of the Markets....LOL
Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.
Thank you for your support.