Click here to Login





                                                   about macd?

  0

0
kulkarni
2010-07-12 07:00:20


hi,
i want to make my own formula with macd indicator but i have problem in it.
i am use macd indicator . in indicator pane macd show chartline & bar . when price go to below O line bar color change & again change when price go upside O line.
in my formula i want that if bar color is red (macd is below 0 line) & bar size is lower than previous bar then show arrow for buy(that means now price will go up).
sell signal is same but bar color is green (that means now price will go down)
my buy or sell formula depend upon only parameter v2(red color values
can u help me?



QuantShare
2010-07-12 07:45:56

  0

What do you mean by bar size is lower than previous bar? range, close?
What is the parameter v2 ?



kulkarni
2010-07-13 01:36:02

  0

i find in formula on right click on macd (view formula) in color red there is parameter value which is used in my formula. if this value is lower than previous date(macd bar)& it is below central line then show arrow for buy signal.
above rule is same for sell rule but only change is it is on above central line (macd bar (color green).



QuantShare
2010-07-13 05:10:28

  0

Here is the formula
PlotArrow(cross(v2, 0), "Buy", BelowLow, colorGreen);
PlotArrow(cross(0, v2), "Sell", AboveHigh, colorRed);

Let me know if this is what you were looking for.



kulkarni
2010-07-13 10:03:56

  0

hello,
i have create this formula but i want plot for it for previous date . i am try to explain it.
how can i send image of chart to u so i can easily explain what i want



QuantShare
2010-07-13 12:43:40

  0

Upload the image using imageshack.us, then post the link


kulkarni
2010-07-15 00:59:03

  0

hi,
here is url. arrow show where i want to generate macd rule arrow. blue color arrow show for buy rule & red for sell . see red color parameter
http://img84.imageshack.us/i/quantsharemacd.png/



QuantShare
2010-07-15 06:02:26

  0

Best Answer
Here is the complete formula:

//MACD
v1 = Macd();
v2 = MacdHist(15);
v3 = MacdSignal(15);

Plot(v1, "Parameter", colorBlue, ChartLine, StyleSymbolNone);
Plot(v3, "Parameter", colorGreen, ChartLine, StyleSymbolNone);

Plot(v2, "Parameter", colorRed|113, ChartBar, StyleSymbolNone);
UpdateColor(v2 > 0, colorLime|116);

brule = v2 > ref(v2, 1) && ref(v2, 1) < ref(v2, 2) && v2 < 0;
srule = v2 < ref(v2, 1) && ref(v2, 1) > ref(v2, 2) && v2 > 0;

PlotArrow(brule, "Buy", BelowLow, colorGreen);
PlotArrow(srule, "Sell", AboveHigh, colorRed);



kulkarni
2010-07-15 07:46:54

  0

THANK YOU VERY MUCH. I AM VERY HAPPY WITH YOUR REPLY.THANKS AGAIN.
how to optimise with this formula?



QuantShare
2010-07-15 08:11:21

  0

What do you want to optimize?


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
Insider trading data
Insider Data History
Sentiment Measure Using ETF Sector Correlations
Index Investment Data for U.S. Futures Markets
Hull Moving Average Strategy - Multi Time Frame Trading System

How-to Lessons
How to plot a stock using different periods in the same chart
How to get fundamental data for U.S. Stocks
How to add custom position-based metrics to your trading system
How to add a metric in the trading system simulation report
How to display Forex economic calendar data in a chart

Related Forum Threads
Question about an object
What about this strategy?
I have been thinking about automation...
First time here. Questions about Excel and Quantshare
about scaners and fliters

Blog Posts
More about QuantShare Programming Language
Compare Multiple Securities in a Single Chart
How to Scan for Parallel Resistance and Support Lines
3 Items To Get and Trade the News In QuantShare Platform
3 Market Indicators based on Fundamental Data









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.