|
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);
|
|