恳请达人修改指标,把以下指标的柱子改成0轴以上绿色、0轴以下红色,不胜感激。
//+------------------------------------------------------------------+
//| |
//| Copyright ?2006, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2006, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
/*********************************************************************
*
* Date: December 14, 2006
* Custom Indicator: GMACD.mq4
* Version: 1.0.2
* Description: Multi TimeFrame MACD Signal
*
* Change Logs
* Version 1.0.2
* - Add Trend Analysis. This analysis will tell you if trend is change
* or trend correction.
*
* Version 1.0.1
* - Rewriting Code. Using less variable & ObjectCreate. Reduce CPU
* Usage. Solve multiple object label show on load.
*
* Version G#MACD_Signal #2
* - Release by CJA
**********************************************************************/
#property indicator_separate_window
#property indicator_buffers 7
#property indicator_color1 LightSlateGray // HISTO
#property indicator_color2 Red // inside line
#property indicator_color3 Blue // inside line
#property indicator_color4 Red //middle line
#property indicator_color5 Blue //middle line
#property indicator_color6 DarkOrange // outside line
#property indicator_color7 DodgerBlue //outside line
#property indicator_width1 2
//---- input parameters
extern int FastEMA=8;
extern int FFastEMA=7;
extern int FFFastEMA=6;
extern int SlowEMA=17;
extern int SSlowEMA=16;
extern int SSSlowEMA=15;
extern int SignalSMA=9;
extern int SSignalSMA=8;
extern int SSSignalSMA=7;
//extern bool Show_MAJOR_TREND = false;
extern bool Show_TREND_ANALYSIS = true;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
double ExtMapBuffer7[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
IndicatorShortName("PERINTIS[2]");
//----
SetIndexStyle(0,DRAW_HISTOGRAM);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_LINE);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexStyle(4,DRAW_LINE);
SetIndexBuffer(4,ExtMapBuffer5);
SetIndexStyle(5,DRAW_LINE);
SetIndexBuffer(5,ExtMapBuffer6);
SetIndexStyle(6,DRAW_LINE);
SetIndexBuffer(6,ExtMapBuffer7);
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
ObjectsDeleteAll(0,OBJ_LABEL);
ObjectDelete("Label1"); ObjectDelete("Label2"); ObjectDelete("Label3");
ObjectDelete("DataM1"); ObjectDelete("DataM5"); ObjectDelete("DataM15");
ObjectDelete("DataM30"); ObjectDelete("DataH1"); ObjectDelete("DataH4");
ObjectDelete("DataD1"); ObjectDelete("DataW1"); ObjectDelete("DataMN");
ObjectDelete("Trend1"); ObjectDelete("Trend2"); ObjectDelete("Level1");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars = IndicatorCounted();
//----
for(int i=Bars;i>=0;i--)
{
ExtMapBuffer2=iMACD(NULL,0,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,i);
ExtMapBuffer3=iMACD(NULL,0,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,i);
ExtMapBuffer4=iMACD(NULL,0,FFastEMA,SSlowEMA,SSignalSMA,PRICE_CLOSE,MODE_MAIN,i);
ExtMapBuffer5=iMACD(NULL,0,FFastEMA,SSlowEMA,SSignalSMA,PRICE_CLOSE,MODE_SIGNAL,i);
ExtMapBuffer6=iMACD(NULL,0,FFFastEMA,SSSlowEMA,SSSignalSMA,PRICE_CLOSE,MODE_MAIN,i);
ExtMapBuffer7=iMACD(NULL,0,FFFastEMA,SSSlowEMA,SSSignalSMA,PRICE_CLOSE,MODE_SIGNAL,i);
ExtMapBuffer1=ExtMapBuffer2 - ExtMapBuffer3;
}
double macd_M1=iMACD(NULL,PERIOD_M1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MM1=iMACD(NULL,PERIOD_M1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_M5=iMACD(NULL,PERIOD_M5,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MM5=iMACD(NULL,PERIOD_M5,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_M15=iMACD(NULL,PERIOD_M15,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MM15=iMACD(NULL,PERIOD_M15,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_M30=iMACD(NULL,PERIOD_M30,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MM30=iMACD(NULL,PERIOD_M30,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_H1=iMACD(NULL,PERIOD_H1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_HH1=iMACD(NULL,PERIOD_H1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_H4=iMACD(NULL,PERIOD_H4,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_HH4=iMACD(NULL,PERIOD_H4,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_D1=iMACD(NULL,PERIOD_D1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_DD1=iMACD(NULL,PERIOD_D1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_W1=iMACD(NULL,PERIOD_W1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_WW1=iMACD(NULL,PERIOD_W1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_MN1=iMACD(NULL,PERIOD_MN1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MMN1=iMACD(NULL,PERIOD_MN1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
string trend_signal, trend_main, trend_level;
color color_m1, color_m5, color_m15, color_m30, color_h1, color_h4, signalcolor_d1, color_w1, color_mn,
color_signal, color_main, color_level;
// UP Data
if ((macd_M5 > macd_MM5) && (macd_M1 > macd_MM1)) { trend_signal = "上升趋势"; color_signal = DodgerBlue;}
//Down Data
if ((macd_M5 macd_MM5) && (macd_M1 macd_MM1)) { trend_signal = "震荡"; color_signal = Orange; }
//Consolidation Data
if ((macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1) && (macd_H4 > macd_HH4)) { trend_main = "上升趋势"; color_main = DodgerBlue; }
if ((macd_M15 macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1) && (macd_H4 macd_HH4)) { trend_main = "下降趋势"; color_main = Crimson; }
if ((macd_M15 macd_MM30) && (macd_H1 > macd_HH1)) { trend_main = "上升趋势"; color_main = Aqua; }
if ((macd_M15 > macd_MM15) && (macd_M30 macd_MM15) && (macd_M30 macd_HH1)) { trend_main = "上升趋势"; color_main = DodgerBlue; }
if ((macd_M15 macd_MM30) && (macd_H1 macd_HH1)) { trend_main = "上升趋势"; color_main = Magenta; }
if ((macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1) && (macd_H4 > macd_HH4)) { trend_level = "强烈"; color_level = Yellow; }
if ((macd_M15 macd_MM30) && (macd_H1 > macd_HH1) && (macd_H4 > macd_HH4)) { trend_level = "中等"; color_level = Orange; }
if ((macd_M15 > macd_MM15) && (macd_M30 macd_MM15) && (macd_M30 macd_HH1) && (macd_H4 > macd_HH4)) { trend_level = "中等"; color_level = Orange; }
if ((macd_M15 macd_MM30) && (macd_H1 macd_HH1) && (macd_H4 > macd_HH4)) { trend_level = "弱势"; color_level = Tomato; }
if ((macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 macd_HH4)) { trend_level = "弱势"; color_level = Tomato; }
if ((macd_M15 macd_HH1) && (macd_H4 macd_MM30) && (macd_H1 macd_HH4)) { trend_level = "中等"; color_level = Orange; }
if ((macd_M15 > macd_MM15) && (macd_M30 macd_HH1) && (macd_H4 macd_MM15) && (macd_M30 macd_HH4)) { trend_level = "中等"; color_level = Orange; }
if ((macd_M15 macd_MM30) && (macd_H1 > macd_HH1) && (macd_H4 macd_HH4)) { trend_level = "强烈"; color_level = Yellow; }
if ((macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1) && (macd_H4 macd_MM1)) { color_m1 = DodgerBlue; }
if ((macd_M1 macd_MM5)) { color_m5 = DodgerBlue; }
if ((macd_M5 macd_MM15)) { color_m15 = DodgerBlue; }
if ((macd_M15 macd_MM30)) { color_m30 = DodgerBlue; }
if ((macd_M30 macd_HH1)) { color_h1 = DodgerBlue; }
if ((macd_H1 macd_HH4)) { color_h4 = DodgerBlue; }
if ((macd_H4 macd_DD1)) { color_d1 = DodgerBlue; }
if ((macd_D1 macd_WW1)) { color_w1 = DodgerBlue; }
if ((macd_W1 macd_MMN1)) { color_mn = DodgerBlue; }
if ((macd_MN1 macd_HH4) && (macd_D1 > macd_DD1)) { analysis_today = "上升趋势"; color_ta = DodgerBlue; }
if ((macd_H4 macd_DD1)) { analysis_today = "上升趋势"; color_ta = Aqua; }
//Today Analysis DN
if ((macd_H4 macd_HH4) && (macd_D1 0) && (macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1)) { analysis_current = "上升趋势"; color_ca = DodgerBlue; }
if ((macd_MM15 macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1)) { analysis_current = "上升趋势"; color_ca = DodgerBlue; }
if ((macd_MM15 > 0) && (macd_M15 macd_MM30) && (macd_H1 > macd_HH1)) { analysis_current = "整理"; color_ca = Aqua; }
if ((macd_MM15 macd_MM30) && (macd_H1 > macd_HH1)) { analysis_current = "整理"; color_ca = Aqua; }
if ((macd_MM15 > 0) && (macd_M15 > macd_MM15) && (macd_M30 macd_HH1)) { analysis_current = "上升趋势"; color_ca = Aqua; }
if ((macd_MM15 macd_MM15) && (macd_M30 macd_HH1)) { analysis_current = "上升趋势"; color_ca = Aqua; }
if ((macd_MM15 > 0) && (macd_M15 macd_HH1)) { analysis_current = "整理"; color_ca = Magenta; }
if ((macd_MM15 macd_HH1)) { analysis_current = "下降趋势"; color_ca = Magenta; }
if ((macd_MM15 0) && (macd_M15 macd_MM15) && (macd_M30 0) && (macd_M15 > macd_MM15) && (macd_M30 macd_MM30) && (macd_H1 0) && (macd_M15 macd_MM30) && (macd_H1 macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 0) && (macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 纯文本查看 复制代码//+------------------------------------------------------------------+
//| |
//| Copyright ?2006, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2006, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
/*********************************************************************
*
* Date: December 14, 2006
* Custom Indicator: GMACD.mq4
* Version: 1.0.2
* Description: Multi TimeFrame MACD Signal
*
* Change Logs
* Version 1.0.2
* - Add Trend Analysis. This analysis will tell you if trend is change
* or trend correction.
*
* Version 1.0.1
* - Rewriting Code. Using less variable & ObjectCreate. Reduce CPU
* Usage. Solve multiple object label show on load.
*
* Version G#MACD_Signal #2
* - Release by CJA
**********************************************************************/
#property indicator_separate_window
#property indicator_buffers 8
#property indicator_color1 Green // HISTO
#property indicator_color2 Red // inside line
#property indicator_color3 Blue // inside line
#property indicator_color4 Red //middle line
#property indicator_color5 Blue //middle line
#property indicator_color6 DarkOrange // outside line
#property indicator_color7 DodgerBlue //outside line
#property indicator_color8 Red // HISTO
#property indicator_width1 4
#property indicator_width8 4
//---- input parameters
extern int FastEMA=8;
extern int FFastEMA=7;
extern int FFFastEMA=6;
extern int SlowEMA=17;
extern int SSlowEMA=16;
extern int SSSlowEMA=15;
extern int SignalSMA=9;
extern int SSignalSMA=8;
extern int SSSignalSMA=7;
//extern bool Show_MAJOR_TREND = false;
extern bool Show_TREND_ANALYSIS = true;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
double ExtMapBuffer7[];
double ExtMapBuffer8[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
IndicatorShortName("PERINTIS[2]");
//----
SetIndexStyle(0,DRAW_HISTOGRAM);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_LINE);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexStyle(4,DRAW_LINE);
SetIndexBuffer(4,ExtMapBuffer5);
SetIndexStyle(5,DRAW_LINE);
SetIndexBuffer(5,ExtMapBuffer6);
SetIndexStyle(6,DRAW_LINE);
SetIndexBuffer(6,ExtMapBuffer7);
SetIndexStyle(7,DRAW_HISTOGRAM);
SetIndexBuffer(7,ExtMapBuffer8);
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
ObjectsDeleteAll(0,OBJ_LABEL);
ObjectDelete("Label1"); ObjectDelete("Label2"); ObjectDelete("Label3");
ObjectDelete("DataM1"); ObjectDelete("DataM5"); ObjectDelete("DataM15");
ObjectDelete("DataM30"); ObjectDelete("DataH1"); ObjectDelete("DataH4");
ObjectDelete("DataD1"); ObjectDelete("DataW1"); ObjectDelete("DataMN");
ObjectDelete("Trend1"); ObjectDelete("Trend2"); ObjectDelete("Level1");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars = IndicatorCounted();
double TEMP;
//----
for(int i=Bars;i>=0;i--)
{
ExtMapBuffer2=iMACD(NULL,0,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,i);
ExtMapBuffer3=iMACD(NULL,0,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,i);
ExtMapBuffer4=iMACD(NULL,0,FFastEMA,SSlowEMA,SSignalSMA,PRICE_CLOSE,MODE_MAIN,i);
ExtMapBuffer5=iMACD(NULL,0,FFastEMA,SSlowEMA,SSignalSMA,PRICE_CLOSE,MODE_SIGNAL,i);
ExtMapBuffer6=iMACD(NULL,0,FFFastEMA,SSSlowEMA,SSSignalSMA,PRICE_CLOSE,MODE_MAIN,i);
ExtMapBuffer7=iMACD(NULL,0,FFFastEMA,SSSlowEMA,SSSignalSMA,PRICE_CLOSE,MODE_SIGNAL,i);
TEMP=ExtMapBuffer2 - ExtMapBuffer3;
if(TEMP>0)
{
ExtMapBuffer1= TEMP;
ExtMapBuffer8= 0;
}
else
{
ExtMapBuffer1= 0;
ExtMapBuffer8= TEMP;
}
}
double macd_M1=iMACD(NULL,PERIOD_M1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MM1=iMACD(NULL,PERIOD_M1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_M5=iMACD(NULL,PERIOD_M5,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MM5=iMACD(NULL,PERIOD_M5,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_M15=iMACD(NULL,PERIOD_M15,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MM15=iMACD(NULL,PERIOD_M15,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_M30=iMACD(NULL,PERIOD_M30,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MM30=iMACD(NULL,PERIOD_M30,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_H1=iMACD(NULL,PERIOD_H1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_HH1=iMACD(NULL,PERIOD_H1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_H4=iMACD(NULL,PERIOD_H4,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_HH4=iMACD(NULL,PERIOD_H4,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_D1=iMACD(NULL,PERIOD_D1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_DD1=iMACD(NULL,PERIOD_D1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_W1=iMACD(NULL,PERIOD_W1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_WW1=iMACD(NULL,PERIOD_W1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_MN1=iMACD(NULL,PERIOD_MN1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MMN1=iMACD(NULL,PERIOD_MN1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
string trend_signal, trend_main, trend_level;
color color_m1, color_m5, color_m15, color_m30, color_h1, color_h4, signalcolor_d1, color_w1, color_mn,
color_signal, color_main, color_level;
// UP Data
if ((macd_M5 > macd_MM5) && (macd_M1 > macd_MM1)) { trend_signal = "上升趋势"; color_signal = DodgerBlue;}
//Down Data
if ((macd_M5 macd_MM5) && (macd_M1 macd_MM1)) { trend_signal = "震荡"; color_signal = Orange; }
//Consolidation Data
if ((macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1) && (macd_H4 > macd_HH4)) { trend_main = "上升趋势"; color_main = DodgerBlue; }
if ((macd_M15 macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1) && (macd_H4 macd_HH4)) { trend_main = "下降趋势"; color_main = Crimson; }
if ((macd_M15 macd_MM30) && (macd_H1 > macd_HH1)) { trend_main = "上升趋势"; color_main = Aqua; }
if ((macd_M15 > macd_MM15) && (macd_M30 macd_MM15) && (macd_M30 macd_HH1)) { trend_main = "上升趋势"; color_main = DodgerBlue; }
if ((macd_M15 macd_MM30) && (macd_H1 macd_HH1)) { trend_main = "上升趋势"; color_main = Magenta; }
if ((macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1) && (macd_H4 > macd_HH4)) { trend_level = "强烈"; color_level = Yellow; }
if ((macd_M15 macd_MM30) && (macd_H1 > macd_HH1) && (macd_H4 > macd_HH4)) { trend_level = "中等"; color_level = Orange; }
if ((macd_M15 > macd_MM15) && (macd_M30 macd_MM15) && (macd_M30 macd_HH1) && (macd_H4 > macd_HH4)) { trend_level = "中等"; color_level = Orange; }
if ((macd_M15 macd_MM30) && (macd_H1 macd_HH1) && (macd_H4 > macd_HH4)) { trend_level = "弱势"; color_level = Tomato; }
if ((macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 macd_HH4)) { trend_level = "弱势"; color_level = Tomato; }
if ((macd_M15 macd_HH1) && (macd_H4 macd_MM30) && (macd_H1 macd_HH4)) { trend_level = "中等"; color_level = Orange; }
if ((macd_M15 > macd_MM15) && (macd_M30 macd_HH1) && (macd_H4 macd_MM15) && (macd_M30 macd_HH4)) { trend_level = "中等"; color_level = Orange; }
if ((macd_M15 macd_MM30) && (macd_H1 > macd_HH1) && (macd_H4 macd_HH4)) { trend_level = "强烈"; color_level = Yellow; }
if ((macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1) && (macd_H4 macd_MM1)) { color_m1 = DodgerBlue; }
if ((macd_M1 macd_MM5)) { color_m5 = DodgerBlue; }
if ((macd_M5 macd_MM15)) { color_m15 = DodgerBlue; }
if ((macd_M15 macd_MM30)) { color_m30 = DodgerBlue; }
if ((macd_M30 macd_HH1)) { color_h1 = DodgerBlue; }
if ((macd_H1 macd_HH4)) { color_h4 = DodgerBlue; }
if ((macd_H4 macd_DD1)) { color_d1 = DodgerBlue; }
if ((macd_D1 macd_WW1)) { color_w1 = DodgerBlue; }
if ((macd_W1 macd_MMN1)) { color_mn = DodgerBlue; }
if ((macd_MN1 macd_HH4) && (macd_D1 > macd_DD1)) { analysis_today = "上升趋势"; color_ta = DodgerBlue; }
if ((macd_H4 macd_DD1)) { analysis_today = "上升趋势"; color_ta = Aqua; }
//Today Analysis DN
if ((macd_H4 macd_HH4) && (macd_D1 0) && (macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1)) { analysis_current = "上升趋势"; color_ca = DodgerBlue; }
if ((macd_MM15 macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1)) { analysis_current = "上升趋势"; color_ca = DodgerBlue; }
if ((macd_MM15 > 0) && (macd_M15 macd_MM30) && (macd_H1 > macd_HH1)) { analysis_current = "整理"; color_ca = Aqua; }
if ((macd_MM15 macd_MM30) && (macd_H1 > macd_HH1)) { analysis_current = "整理"; color_ca = Aqua; }
if ((macd_MM15 > 0) && (macd_M15 > macd_MM15) && (macd_M30 macd_HH1)) { analysis_current = "上升趋势"; color_ca = Aqua; }
if ((macd_MM15 macd_MM15) && (macd_M30 macd_HH1)) { analysis_current = "上升趋势"; color_ca = Aqua; }
if ((macd_MM15 > 0) && (macd_M15 macd_HH1)) { analysis_current = "整理"; color_ca = Magenta; }
if ((macd_MM15 macd_HH1)) { analysis_current = "下降趋势"; color_ca = Magenta; }
if ((macd_MM15 0) && (macd_M15 macd_MM15) && (macd_M30 0) && (macd_M15 > macd_MM15) && (macd_M30 macd_MM30) && (macd_H1 0) && (macd_M15 macd_MM30) && (macd_H1 macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 0) && (macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 |