![]() |
|
| Discuss AmiBroker formula Language at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Hi friends and seniors, help me This is an attempt (by a newbie) to draw ... |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools |
| Sponsored Links |
|
#121
|
|||
|
|||
|
Hi friends and seniors,
help me This is an attempt (by a newbie) to draw MACD. I want title like: MACD Plot for:500343(PUDUMJEE)Daily - 3/12/2007MACD:M(12,26) = 1.3, Signal:S(12, 26, 9) = 1.2, Hist: H = 2 for that, i have written some code: Code:
_SECTION_BEGIN("MACD Plot Title");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat(EncodeColor(colorGold)+"MACD Plot for:" + EncodeColor(colorBlue)+"{{NAME}}"
+ EncodeColor(colorRed) + "(" + FullName() + ") "
+ EncodeColor(colorBlue) + "- {{INTERVAL}} {{DATE}}"));
_SECTION_END();
_SECTION_BEGIN("Plot MACD");
MACDName = StrFormat("MACD: M(" + macdStr + ") = " + WriteVal(MACDInd, 1.3));
Plot( MACDInd, MACDName, myColor, ParamStyle("Style"));
_SECTION_END();
_SECTION_BEGIN("Plot Signal");
//SignalName = StrFormat("Sig(" + sigStr + ") = " + WriteVal(SigInd,1.3));
Plot( SigInd , StrFormat("Sig(" + sigStr + ") = " + WriteVal(SigInd,1.3)), colorBlue, ParamStyle("Style"));
_SECTION_END();
_SECTION_BEGIN("Plot Histogram");
HistName = StrFormat("H = " + WriteVal(HistInd,1.3));
Plot( HistInd, HistName, myColor, styleHistogram | styleOwnScale | styleThick , -scaleHist * 1.2, scaleHist * 1.2);
_SECTION_END();
Title as defined in _N(Title...) but other parts are not coming in the title. Infact all the things are coming in the interpretation window. I wanted nothing in the interpretation window but everything in the title: And also how to clear the interpretation window? like cls for dos. Where am i doing wrong?? pls help regards, ashutosh |
| Sponsored Links |
|
#122
|
|||
|
|||
|
Ashutosh
Try this... Title = ("MACD Plot for " + Name()+" " + Date() +" "+Interval(2) +" "+ EncodeColor(colorLime)+",Open "+Open +" ,High "+H+" ,Low "+L+" ,Close "+C+" "+"{{VALUES}}"); regards Karthik |
|
#123
|
|||
|
|||
|
Quote:
Hey Karthik, I tried your code. but again, i am unable to get what i want: This is the Interpretation that is being printed on AB Interpretation window: Code:
MACD_Histogram
Date: 4/5/2007
Daily
MACD Plot for MARUTI 4/5/2007 Daily,O:746 ,H:763.9 ,L:741 ,C:755.9 {{VALUES}}
MACD: M(12,26) = -23.258
Sig(12,26,9) = -21.091
H = -2.167
Review of MARUTI UDYOG LIMITED (MARUTI)
as of 4/5/2007
Current Statistics
Close: 755.900
Change: 9.950
MACD Value: -23.258
Signal Line: -21.091
The MACD can provide buy/sell indications in three ways, signal line crossovers, overbought/oversold conditions, and divergences.
Crossovers:
Currently the MACD is bearish since it is trading below its signal line.
The MACD crossed below its signal line 1 period(s) ago.
Since the MACD crossed its moving average, MARUTI's price has increased 1.334%
And has ranged from a high of 768.000 to a low of 741.000
Overbought/Oversold
The MACD is not in an Overbought/Oversold range.
Divergence
There have been no divergence signals within the last 5 periods.
The {{VALUES}} PORTION. In the chart (attached as attachment): The initial part is in black, which i want as gold (i guess encodecolor() will do) But, the values of macd signal or hist is being printed twice, One in black and one in color(pls see the chart); this is the code snippet resulting in the double values in the chart (....I think) Code:
_SECTION_BEGIN("MACD Plot Title");
SetChartOptions(0,chartShowArrows|chartShowDates);
/*_N(Title = StrFormat(EncodeColor(colorGold)+"MACD Plot for:" + EncodeColor(colorBlue)+"{{NAME}}"
+ EncodeColor(colorRed) + "(" + FullName() + ") "
+ EncodeColor(colorBlue) + "- {{INTERVAL}} {{DATE}}"));
*/
Title = ("MACD Plot for " + Name()+" " + Date() +" "+Interval(2)
+ ",O:" + O + " ,H:" + H + " ,L:" + L + " ,C:" + C + " " + "{{VALUES}}");
_SECTION_END();
_SECTION_BEGIN("Plot MACD");
MACDName = StrFormat("MACD: M(" + macdStr + ") = " + WriteVal(MACDInd, 1.3));
Plot( MACDInd, MACDName, myColor, ParamStyle("Style"));
_SECTION_END();
regards ashutosh |
|
#124
|
|||
|
|||
|
Hi Ashutosh
You have duplicate sections almost doing the same thing . Title = ("MACD Plot for " + Name()+" " + Date() +" "+Interval(2) + ",O:" + O + " ,H:" + H + " ,L:" + L + " ,C:" + C + " " + "{{VALUES}}"); _SECTION_END(); _SECTION_BEGIN("Plot MACD"); MACDName = StrFormat("MACD: M(" + macdStr + ") = " + WriteVal(MACDInd, 1.3)); Plot( MACDInd, MACDName, myColor, ParamStyle("Style")); _SECTION_END(); Did you try using one of them only. regards Karthik |
|
#125
|
|||
|
|||
|
Quote:
finally got it right. You were correct, I used one and got the result. You are the man. thanks again karthik regards ashutosh |
|
#126
|
|||
|
|||
|
you know what people, 10 years of looking at indicators, and have realised that pure price action is the way to make money.
follow price.....it keeps you objective. Just my 2 cents.... |
|
#127
|
|||
|
|||
|
Quote:
Elaborate my friend. Price action? Need details as to how.. and how to follow price........ regards |
|
#128
|
|||
|
|||
|
Hi seniors,
i found a post in this forum by satya where he posted a program to calculate support resistance etc. below is his post Code:
Pivot, Support , Resistance Calculator -------------------------------------------------------------------------------- Friends, just try this tool developed by me. It calculates automatically all the R3, R2, R1, Pivot , S1, S2, S3 points for the next day. The input for this application is a flat file with stock quotes. the zip files has 2 files 1. Pivot.exe the executable file you should run 2. stock.ini file, where you can store your favourite stocks(e.g infosys,hinlev,icici,wipro,satcom) the names should match with the names in flat file. let me know, if it works fine. Satya or else where can i find theory regarding the method to calculate R1, R2 etc.. regards ashutosh |
|
#129
|
|||
|
|||
|
Quote:
|
|
#130
|
|||
|
|||
|
AFL code for PIPE PATTERN wanted.
|
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads for: AmiBroker formula Language
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| need help on formula | cmlee | MetaStock | 23 | 8th October 2007 07:55 PM |
| Metastock ,Metatrader & Amibroker indicator formula | saji oommen | MetaStock | 0 | 4th June 2006 06:35 PM |
| Metastock language help | Ropewalker | MetaStock | 4 | 1st November 2005 09:16 PM |
| TradeStation & MetaStock Formula Language | bikertrader | MetaStock | 4 | 10th December 2004 01:50 PM |
Indemnity, Disclaimer & Disclosure
Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum
Rules Disclaimer & Disclosure and indemnify Traderji.com, its
associates and related parties of all claims howsoever resulting from
the usage of the forum.
• Disclaimer: Trading or investing in stocks & commodities
is a high risk activity. Any action you choose to take in the markets
is totally your own responsibility. Traderji.com will not be liable for
any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
• Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein.
The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.