|
有三个指标:(只用于日图)
波幅标注:在图中标出波幅大于X的日子
实体波幅标注:在图中标出实体大于X的日子
AverageDailyRange:显示50,100,200天的平均波幅(非实体)
只能用于一周5天的平台,最好是早5点或者6点开盘(平台新的一天开始)那种,比如FXDD,附件是FXDD的demo账户
--------------------------------------------
改进版的F大日K系统:
和从前没啥区别,只把错误改了,之前的版本有好几个错误,而且没有标示出影线。。。现在指标可用于M30和H1
适应不同开盘日期的没改出来呢。。。所以现在依然是最好用FXDD_DEMO平台。
实体波幅标注代码:
- #property indicator_separate_window
- #property indicator_buffers 2
- #property indicator_color1 Lime
- #property indicator_color2 Red
- #property indicator_minimum -5
- #property indicator_maximum 5
- double UP_Buff[];
- double DN_Buff[];
- int Symbol_UP=233;
- int Symbol_DN=234;
- extern int DailyRange=100;
- string Name="";
- string LabelName="";
- //字体大小型号颜色
- int FontSize=24;
- string FontType="Times New Roman";
- color FontColor=Green;
- //+------------------------------------------------------------------+
- //| Custom indicator initialization function |
- //+------------------------------------------------------------------+
- int init()
- {
- //---- indicators
- //----
-
- SetIndexBuffer(0,UP_Buff);
- SetIndexStyle(0,DRAW_ARROW,0,0);
- SetIndexArrow(0,Symbol_UP);
- SetIndexBuffer(0,UP_Buff);
- SetIndexBuffer(1,DN_Buff);
- SetIndexStyle(1,DRAW_ARROW,0,0);
- SetIndexArrow(1,Symbol_DN);
- SetIndexBuffer(1,DN_Buff);
-
- Name="Y_实体波幅标注"+"("+DoubleToStr(DailyRange,0)+")";
- IndicatorShortName(Name);
-
- LabelName="DailyRange_Label"+"="+DoubleToStr(DailyRange,0);
-
-
- return(0);
- }
- //+------------------------------------------------------------------+
- //| Custom indicator deinitialization function |
- //+------------------------------------------------------------------+
- int deinit()
- {
- //----
- ObjectDelete(LabelName);
- //----
- return(0);
- }
- //+------------------------------------------------------------------+
- //| Custom indicator iteration function |
- //+------------------------------------------------------------------+
- int start()
- {
- int limit;
- int counted_bars=IndicatorCounted();
-
- if(counted_bars>0) counted_bars--;
-
- limit=Bars-counted_bars;
-
- for(int i=0; i<limit; i++) {
- if(MathAbs(Open[i]-Close[i])>(DailyRange*Point*10))//波幅大于xxx点的日子
- {
- UP_Buff[i]=-1;
- }
- if(1==1)
- {
- //DN_Buff[i]=1;
- }
- }
- ObjectCreate(LabelName, OBJ_LABEL, WindowFind(Name), 0, 0);
- ObjectSetText(LabelName, "实体 :"+DoubleToStr(DailyRange,0), FontSize, FontType, FontColor);
- ObjectSet(LabelName, OBJPROP_CORNER, 1);
- ObjectSet(LabelName, OBJPROP_XDISTANCE, 1);
- ObjectSet(LabelName, OBJPROP_YDISTANCE, 1);
- return(0);
- }
- //+------------------------------------------------------------------+
复制代码
波幅标注代码:
- #property indicator_separate_window
- #property indicator_buffers 2
- #property indicator_color1 Lime
- #property indicator_color2 Red
- #property indicator_minimum -5
- #property indicator_maximum 5
- double UP_Buff[];
- double DN_Buff[];
- int Symbol_UP=233;
- int Symbol_DN=234;
- extern int DailyRange=200;
- string Name="";
- string LabelName="";
- //字体大小型号颜色
- int FontSize=24;
- string FontType="Times New Roman";
- color FontColor=Green;
- //+------------------------------------------------------------------+
- //| Custom indicator initialization function |
- //+------------------------------------------------------------------+
- int init()
- {
- //---- indicators
- //----
-
- SetIndexBuffer(0,UP_Buff);
- SetIndexStyle(0,DRAW_ARROW,0,0);
- SetIndexArrow(0,Symbol_UP);
- SetIndexBuffer(0,UP_Buff);
- SetIndexBuffer(1,DN_Buff);
- SetIndexStyle(1,DRAW_ARROW,0,0);
- SetIndexArrow(1,Symbol_DN);
- SetIndexBuffer(1,DN_Buff);
-
- Name="Y_波幅标注"+"("+DoubleToStr(DailyRange,0)+")";
- IndicatorShortName(Name);
-
- LabelName="DailyRange_Label"+"="+DoubleToStr(DailyRange,0);
-
-
- return(0);
- }
- //+------------------------------------------------------------------+
- //| Custom indicator deinitialization function |
- //+------------------------------------------------------------------+
- int deinit()
- {
- //----
- ObjectDelete(LabelName);
- //----
- return(0);
- }
- //+------------------------------------------------------------------+
- //| Custom indicator iteration function |
- //+------------------------------------------------------------------+
- int start()
- {
- int limit;
- int counted_bars=IndicatorCounted();
-
- if(counted_bars>0) counted_bars--;
-
- limit=Bars-counted_bars;
-
- for(int i=0; i<limit; i++) {
- if(MathAbs(High[i]-Low[i])>(DailyRange*Point*10))//波幅大于200点的日子
- {
- UP_Buff[i]=-1;
- }
- if(1==1)
- {
- //DN_Buff[i]=1;
- }
- }
- ObjectCreate(LabelName, OBJ_LABEL, WindowFind(Name), 0, 0);
- ObjectSetText(LabelName, "波幅 :"+DoubleToStr(DailyRange,0), FontSize, FontType, FontColor);
- ObjectSet(LabelName, OBJPROP_CORNER, 1);
- ObjectSet(LabelName, OBJPROP_XDISTANCE, 1);
- ObjectSet(LabelName, OBJPROP_YDISTANCE, 1);
- return(0);
- }
- //+------------------------------------------------------------------+
复制代码
日平均rangge代码:
- //+------------------------------------------------------------------+
- //| TSR_Ranges.mq4 |
- //| Copyright ?2006, Ogeima |
- //+------------------------------------------------------------------+
- #property copyright "Copyright ?2006, Ogeima"
- #property indicator_chart_window
- //---- input parameters
- extern double Risk_to_Reward_ratio = 3.0;
- int nDigits;
- //+------------------------------------------------------------------+
- //| Custom indicator initialization function |
- //+------------------------------------------------------------------+
- int init()
- {
- if(Symbol()=="GBPJPY" || Symbol()=="EURJPY" || Symbol()=="USDJPY" || Symbol()=="XAUUSD") nDigits = 3;
- else nDigits = 5;
- return(0);
- }
- //+------------------------------------------------------------------+
- //| Custom indicator deinitialization function |
- //+------------------------------------------------------------------+
- int deinit()
- {
- //----
- Comment("");
- //----
- return(0);
- }
- //+------------------------------------------------------------------+
- //| Custom indicator iteration function |
- //+------------------------------------------------------------------+
- int start()
- {
- //----
- int R1=0,R50=0,R100=0,R200=0;
- string Text="";
- int i=0;
- R1 = (iHigh(NULL,PERIOD_D1,1)-iLow(NULL,PERIOD_D1,1))/Point;
- for(i=1;i<=50;i++)
- R50 = R50 + (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point;
- for(i=1;i<=100;i++)
- R100 = R100 + (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point;
- for(i=1;i<=200;i++)
- R200 = R200 + (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point;
- R50 = R50/50;
- R100 = R100/100;
- R200 = R200/200;
-
- Text = "Prev 1 Day Range: " + R1 + "\n" +
- "Prev 50 Days Range: " + R50 + "\n" +
- "Prev 100 Days Range: " + R100 + "\n" +
- "Prev 200 Days Range: " + R200 + "\n";
- Comment(Text);
- return(0);
- }
- //+------------------------------------------------------------------+
复制代码
frlin2003日k交易系统代码:
- //+------------------------------------------------------------------+
- //| F大日K交易系统.mq4 |
- //| Copyright 2012, MetaQuotes Software Corp. |
- //+------------------------------------------------------------------+
- #property indicator_chart_window
- double YesOpen,YesClose,YesHigh,YesLow;
- string Yes_K_Type; //阴线 or 阳线 or 十字星
- double YesShiTi; //实体数值
- string YesSize; //大中小实体
- color ShiTi_Color; //实体颜色
- int init(){
- return(0);
- }
- int deinit(){
- ObjectDelete("Yes_ShiTi");
- ObjectDelete("BuyLimit");
- ObjectDelete("BuyLimit_SL");
- ObjectDelete("SellLimit");
- ObjectDelete("SellLimit_SL");
- ObjectDelete("BuyNow");
- ObjectDelete("Blue_Rectangle");
- ObjectDelete("Red_Rectangle");
- ObjectDelete("Text_ShiTi");
- ObjectDelete("Text_ShangYing");
- ObjectDelete("Text_XiaYing");
- ObjectDelete("SellNow");
- return(0);
- }
- int start(){
-
- if(Period()!=PERIOD_H1 && Period()!=PERIOD_M30){
- ObjectDelete("Yes_ShiTi");
- ObjectDelete("BuyLimit");
- ObjectDelete("BuyLimit_SL");
- ObjectDelete("SellLimit");
- ObjectDelete("SellLimit_SL");
- ObjectDelete("BuyNow");
- ObjectDelete("Blue_Rectangle");
- ObjectDelete("Red_Rectangle");
- ObjectDelete("Text_ShiTi");
- ObjectDelete("Text_ShangYing");
- ObjectDelete("Text_XiaYing");
- ObjectDelete("SellNow");
- return(0);
- }
- ObjectDelete("Yes_ShiTi");
- ObjectDelete("BuyLimit");
- ObjectDelete("BuyLimit_SL");
- ObjectDelete("SellLimit");
- ObjectDelete("SellLimit_SL");
- ObjectDelete("BuyNow");
- ObjectDelete("Blue_Rectangle");
- ObjectDelete("Red_Rectangle");
- ObjectDelete("Text_ShiTi");
- ObjectDelete("Text_ShangYing");
- ObjectDelete("Text_XiaYing");
- ObjectDelete("SellNow");
-
- //取昨天日线4个值
- YesOpen=iOpen(NULL,PERIOD_D1,1);
- YesClose=iClose(NULL,PERIOD_D1,1);
- YesHigh=iHigh(NULL,PERIOD_D1,1);
- YesLow=iLow(NULL,PERIOD_D1,1);
- //END
- //取昨天日线实体长度
- YesShiTi=MathAbs(YesOpen-YesClose)*10000; //5位小数转换成点数
- //END
- //判断昨天日线阴阳
- if (YesOpen<YesClose){
- Yes_K_Type="Yang";
- }
- else if (YesOpen>YesClose){
- Yes_K_Type="Yin";
- }
- else if (YesOpen==YesClose){
- Yes_K_Type="Cross";
- }
- //END
- //判断昨天日线实体大中小
- if(YesShiTi<60){
- YesSize="Small";
- }
- else if(YesShiTi>=60 && YesShiTi<100){
- YesSize="Middle";
- }
- else if(YesShiTi>=100 && YesShiTi<=130){
- YesSize="Big";
- }
- else if(YesShiTi>130){
- YesSize="SuperBig";
- }
- //END
- //画出实体
- if(Yes_K_Type=="Yang"){
- ShiTi_Color=C'75,0,0';
- }
- else if(Yes_K_Type=="Yin"){
- ShiTi_Color=C'0,0,75';
- }
-
- ObjectCreate ( "Yes_ShiTi", OBJ_RECTANGLE, 0, iTime(NULL,PERIOD_D1,1), YesOpen,iTime(NULL,PERIOD_D1,0),YesClose );
- ObjectSet ( "Yes_ShiTi", OBJPROP_COLOR, ShiTi_Color );
- ObjectSet ( "Yes_ShiTi", OBJPROP_BACK, 1 );
- //END
- //判断是否有上下影线
- if( (YesHigh-MathMax(YesOpen,YesClose))>=MathAbs(YesClose-YesOpen) || (MathMin(YesOpen,YesClose)-YesLow)>=MathAbs(YesClose-YesOpen)){
- if((YesHigh-MathMax(YesOpen,YesClose))>=MathAbs(YesClose-YesOpen)){
- ObjectCreate ( "Text_ShangYing", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,1)+3600*12, YesHigh+0.0020 );
- ObjectSet ( "Text_ShangYing", OBJPROP_COLOR, Maroon );
- ObjectSetText ( "Text_ShangYing", "上影>实", 16, "Arial" );
- }
- if((MathMin(YesOpen,YesClose)-YesLow)>=MathAbs(YesClose-YesOpen)){
- ObjectCreate ( "Text_XiaYing", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,1)+3600*12, YesLow-0.0010 );
- ObjectSet ( "Text_XiaYing", OBJPROP_COLOR, Maroon );
- ObjectSetText ( "Text_XiaYing", "下影>实", 16, "Arial" );
- }
- return (0);
- }
- //END
- //小阳
- if(YesSize=="Small" && Yes_K_Type=="Yang"){
- //昨天底部附近位置挂多
- ObjectCreate ( "BuyLimit", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesOpen );
- ObjectSet ( "BuyLimit", OBJPROP_COLOR, Red );
- ObjectSetText ( "BuyLimit", "<< "+"挂↑↑↑", 10, "Arial" );
- //昨天底部附近位置挂多的止损
- ObjectCreate ( "BuyLimit_SL", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesOpen-0.0050 );
- ObjectSet ( "BuyLimit_SL", OBJPROP_COLOR, Red );
- ObjectSetText ( "BuyLimit_SL", "<< "+"↑↑↑SL", 10, "Arial" );
- //按照日内一波70点波幅挂空
- ObjectCreate ( "SellLimit", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose+0.0070 );
- ObjectSet ( "SellLimit", OBJPROP_COLOR, Aqua );
- ObjectSetText ( "SellLimit", "<< "+"挂↓↓↓", 10, "Arial" );
- //按照日内一波70点波幅挂空的止损
- ObjectCreate ( "SellLimit_SL", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose+0.0120 );
- ObjectSet ( "SellLimit_SL", OBJPROP_COLOR, Aqua );
- ObjectSetText ( "SellLimit_SL", "<< "+"↓↓↓SL", 10, "Arial" );
- //现价多头跟进方案,止损50-70
- ObjectCreate ( "BuyNow", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose );
- ObjectSet ( "BuyNow", OBJPROP_COLOR, Red );
- ObjectSetText ( "BuyNow", "<< "+"↑↑↑ Now", 10, "Arial" );
- //蓝色区域几率最大
- ObjectCreate ( "Blue_Rectangle", OBJ_RECTANGLE, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+1), YesOpen-0.0050,iTime(NULL,PERIOD_D1,0)+3600*(24+12-1),YesClose+0.0070 );
- ObjectSet ( "Blue_Rectangle", OBJPROP_COLOR, Blue );
- ObjectSet ( "Blue_Rectangle", OBJPROP_BACK, 0 );//方块边沿变为线条
- //红色区域
- ObjectCreate ( "Red_Rectangle", OBJ_RECTANGLE, 0, iTime(NULL,PERIOD_D1,0)+3600*(24), YesOpen-0.0120,iTime(NULL,PERIOD_D1,0)+3600*(24+12),YesClose+0.0120 );
- ObjectSet ( "Red_Rectangle", OBJPROP_COLOR, Red );
- ObjectSet ( "Red_Rectangle", OBJPROP_BACK, 0 );//方块边沿变为线条
- //大中小阴阳
- ObjectCreate ( "Text_ShiTi", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,1)+3600*12, YesLow-0.0010 );
- ObjectSet ( "Text_ShiTi", OBJPROP_COLOR, Maroon );
- ObjectSetText ( "Text_ShiTi", "小阳", 16, "Arial" );
- }
- //小阴
- else if(YesSize=="Small" && Yes_K_Type=="Yin"){
- //昨天顶部附近位置挂空
- ObjectCreate ( "SellLimit", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesOpen );
- ObjectSet ( "SellLimit", OBJPROP_COLOR, Aqua );
- ObjectSetText ( "SellLimit", "<< "+"挂↓↓↓", 10, "Arial" );
- //昨天底部附近位置挂多的止损
- ObjectCreate ( "SellLimit_SL", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesOpen+0.0050 );
- ObjectSet ( "SellLimit_SL", OBJPROP_COLOR, Aqua );
- ObjectSetText ( "SellLimit_SL", "<< "+"↓↓↓SL", 10, "Arial" );
- //按照日内一波70点波幅根据信号做多
- ObjectCreate ( "BuyLimit", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose-0.0070 );
- ObjectSet ( "BuyLimit", OBJPROP_COLOR, Red );
- ObjectSetText ( "BuyLimit", "<< "+"信号↑↑↑", 10, "Arial" );
- //按照日内一波70点波幅根据信号做多的止损
- ObjectCreate ( "BuyLimit_SL", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose-0.0120 );
- ObjectSet ( "BuyLimit_SL", OBJPROP_COLOR, Red );
- ObjectSetText ( "BuyLimit_SL", "<< "+"↑↑↑SL", 10, "Arial" );
- //现价空头跟进方案,止损50-70
- ObjectCreate ( "SellNow", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose );
- ObjectSet ( "SellNow", OBJPROP_COLOR, Aqua );
- ObjectSetText ( "SellNow", "<< "+"↓↓↓ Now", 10, "Arial" );
- //蓝色区域几率最大
- ObjectCreate ( "Blue_Rectangle", OBJ_RECTANGLE, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+1), YesOpen+0.0050,iTime(NULL,PERIOD_D1,0)+3600*(24+12-1),YesClose-0.0070 );
- ObjectSet ( "Blue_Rectangle", OBJPROP_COLOR, Blue );
- ObjectSet ( "Blue_Rectangle", OBJPROP_BACK, 0 );//方块边沿变为线条
- //红色区域
- ObjectCreate ( "Red_Rectangle", OBJ_RECTANGLE, 0, iTime(NULL,PERIOD_D1,0)+3600*(24), YesOpen+0.0120,iTime(NULL,PERIOD_D1,0)+3600*(24+12),YesClose-0.0120 );
- ObjectSet ( "Red_Rectangle", OBJPROP_COLOR, Red );
- ObjectSet ( "Red_Rectangle", OBJPROP_BACK, 0 );//方块边沿变为线条
- //大中小阴阳
- ObjectCreate ( "Text_ShiTi", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,1)+3600*12, YesLow-0.0010 );
- ObjectSet ( "Text_ShiTi", OBJPROP_COLOR, Maroon );
- ObjectSetText ( "Text_ShiTi", "小阴", 16, "Arial" );
- //
- }
- //中阳
- else if(YesSize=="Middle" && Yes_K_Type=="Yang"){
- //位置大约是1/2位置挂多
- ObjectCreate ( "BuyLimit", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesOpen+(YesClose-YesOpen)/2 );
- ObjectSet ( "BuyLimit", OBJPROP_COLOR, Red );
- ObjectSetText ( "BuyLimit", "<< "+"挂↑↑↑", 10, "Arial" );
- //50点止损
- ObjectCreate ( "BuyLimit_SL", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesOpen+(YesClose-YesOpen)/2-0.0050 );
- ObjectSet ( "BuyLimit_SL", OBJPROP_COLOR, Red );
- ObjectSetText ( "BuyLimit_SL", "<< "+"↑↑↑SL", 10, "Arial" );
- //昨天收盘后加昨天的总体幅度挂空
- ObjectCreate ( "SellLimit", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose+(YesClose-YesOpen) );
- ObjectSet ( "SellLimit", OBJPROP_COLOR, Aqua );
- ObjectSetText ( "SellLimit", "<< "+"挂↓↓↓", 10, "Arial" );
- //70点止损
- ObjectCreate ( "SellLimit_SL", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose+(YesClose-YesOpen)+0.0070 );
- ObjectSet ( "SellLimit_SL", OBJPROP_COLOR, Aqua );
- ObjectSetText ( "SellLimit_SL", "<< "+"↓↓↓SL", 10, "Arial" );
- //现价多头跟进方案,止损到中阳下面一点
- ObjectCreate ( "BuyNow", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose );
- ObjectSet ( "BuyNow", OBJPROP_COLOR, Red );
- ObjectSetText ( "BuyNow", "<< "+"↑↑↑ Now", 10, "Arial" );
- //红色区域
- ObjectCreate ( "Red_Rectangle", OBJ_RECTANGLE, 0, iTime(NULL,PERIOD_D1,0)+3600*(24), YesClose+(YesClose-YesOpen),iTime(NULL,PERIOD_D1,0)+3600*(24+12),YesOpen+(YesClose-YesOpen)*(1.0/3.0));
- ObjectSet ( "Red_Rectangle", OBJPROP_COLOR, Red );
- ObjectSet ( "Red_Rectangle", OBJPROP_BACK, 0 );//方块边沿变为线条
- //大中小阴阳
- ObjectCreate ( "Text_ShiTi", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,1)+3600*12, YesLow-0.0010 );
- ObjectSet ( "Text_ShiTi", OBJPROP_COLOR, Maroon );
- ObjectSetText ( "Text_ShiTi", "中阳", 16, "Arial" );
- //
- }
- //中阴
- else if(YesSize=="Middle" && Yes_K_Type=="Yin"){
-
- //位置大约是1/2位置挂空
- ObjectCreate ( "SellLimit", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesOpen-(YesOpen-YesClose)/2 );
- ObjectSet ( "SellLimit", OBJPROP_COLOR, Aqua );
- ObjectSetText ( "SellLimit", "<< "+"挂↓↓↓", 10, "Arial" );
- //50点止损
- ObjectCreate ( "SellLimit_SL", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesOpen-(YesOpen-YesClose)/2+0.0050 );
- ObjectSet ( "SellLimit_SL", OBJPROP_COLOR, Aqua );
- ObjectSetText ( "SellLimit_SL", "<< "+"↓↓↓SL", 10, "Arial" );
- //昨天收盘后加昨天的总体幅度根据信号现价多
- ObjectCreate ( "BuyLimit", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose-(YesOpen-YesClose) );
- ObjectSet ( "BuyLimit", OBJPROP_COLOR, Red );
- ObjectSetText ( "BuyLimit", "<< "+"信号↑↑↑", 10, "Arial" );
- //70点止损
- ObjectCreate ( "BuyLimit_SL", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose-(YesOpen-YesClose)-0.0070 );
- ObjectSet ( "BuyLimit_SL", OBJPROP_COLOR, Red );
- ObjectSetText ( "BuyLimit_SL", "<< "+"↑↑↑SL", 10, "Arial" );
- //现价空头跟进方案,止损到中阳下面一点
- ObjectCreate ( "SellNow", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose );
- ObjectSet ( "SellNow", OBJPROP_COLOR, Aqua );
- ObjectSetText ( "SellNow", "<< "+"↓↓↓Now", 10, "Arial" );
- //红色区域(估算位置)
- ObjectCreate ( "Red_Rectangle", OBJ_RECTANGLE, 0, iTime(NULL,PERIOD_D1,0)+3600*(24), YesOpen-(YesOpen-YesClose)*(1.0/3.0),iTime(NULL,PERIOD_D1,0)+3600*(24+12),YesClose-(YesOpen-YesClose));
- ObjectSet ( "Red_Rectangle", OBJPROP_COLOR, Red );
- ObjectSet ( "Red_Rectangle", OBJPROP_BACK, 0 );//方块边沿变为线条
- //大中小阴阳
- ObjectCreate ( "Text_ShiTi", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,1)+3600*12, YesLow-0.0010 );
- ObjectSet ( "Text_ShiTi", OBJPROP_COLOR, Maroon );
- ObjectSetText ( "Text_ShiTi", "中阴", 16, "Arial" );
- //
- }
- //大阳
- else if(YesSize=="Big" && Yes_K_Type=="Yang"){//有疑问
- //位置大约是1/2位置上面20-30挂多
- ObjectCreate ( "BuyLimit", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesOpen+(YesClose-YesOpen)/2+0.0030 );
- ObjectSet ( "BuyLimit", OBJPROP_COLOR, Red );
- ObjectSetText ( "BuyLimit", "<< "+"挂↑↑↑", 10, "Arial" );
- //50点止损
- ObjectCreate ( "BuyLimit_SL", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesOpen+(YesClose-YesOpen)/2+0.0020-0.0050 );
- ObjectSet ( "BuyLimit_SL", OBJPROP_COLOR, Red );
- ObjectSetText ( "BuyLimit_SL", "<< "+"↑↑↑SL", 10, "Arial" );
- //昨天上涨幅度一半的位置加上去偏下的位置(???)
- ObjectCreate ( "SellLimit", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose+(YesClose-YesOpen)/2 );
- ObjectSet ( "SellLimit", OBJPROP_COLOR, Aqua );
- ObjectSetText ( "SellLimit", "<< "+"挂↓↓↓", 10, "Arial" );
- //70点止损(???)
- ObjectCreate ( "SellLimit_SL", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose+(YesClose-YesOpen)/2+0.0070 );
- ObjectSet ( "SellLimit_SL", OBJPROP_COLOR, Aqua );
- ObjectSetText ( "SellLimit_SL", "<< "+"↓↓↓SL", 10, "Arial" );
- //红色区域
- ObjectCreate ( "Red_Rectangle", OBJ_RECTANGLE, 0, iTime(NULL,PERIOD_D1,0)+3600*(24), YesClose+(YesClose-YesOpen)/2,iTime(NULL,PERIOD_D1,0)+3600*(24+12),YesOpen+(YesClose-YesOpen)/2 );
- ObjectSet ( "Red_Rectangle", OBJPROP_COLOR, Red );
- ObjectSet ( "Red_Rectangle", OBJPROP_BACK, 0 );//方块边沿变为线条
- //大中小阴阳
- ObjectCreate ( "Text_ShiTi", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,1)+3600*12, YesLow-0.0010 );
- ObjectSet ( "Text_ShiTi", OBJPROP_COLOR, Maroon );
- ObjectSetText ( "Text_ShiTi", "大阳", 16, "Arial" );
- //
- }
- //大阴
- else if(YesSize=="Big" && Yes_K_Type=="Yin"){//有疑问
- //位置大约是1/2位置下面20-30点挂空
- ObjectCreate ( "SellLimit", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesOpen-(YesOpen-YesClose)/2-0.0030 );
- ObjectSet ( "SellLimit", OBJPROP_COLOR, Red );
- ObjectSetText ( "SellLimit", "<< "+"挂↓↓↓", 10, "Arial" );
- //50点止损
- ObjectCreate ( "SellLimit_SL", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesOpen-(YesOpen-YesClose)/2-0.0030+0.0050 );
- ObjectSet ( "SellLimit_SL", OBJPROP_COLOR, Red );
- ObjectSetText ( "SellLimit_SL", "<< "+"↓↓↓SL", 10, "Arial" );
- //昨天收盘后加昨天的总体幅度根据信号现价多
- ObjectCreate ( "BuyLimit", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose-(YesOpen-YesClose)/2 );
- ObjectSet ( "BuyLimit", OBJPROP_COLOR, Aqua );
- ObjectSetText ( "BuyLimit", "<< "+"信号↑↑↑", 10, "Arial" );
- //70点止损
- ObjectCreate ( "BuyLimit_SL", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,0)+3600*(24+12+12), YesClose-(YesOpen-YesClose)/2-0.0070 );
- ObjectSet ( "BuyLimit_SL", OBJPROP_COLOR, Aqua );
- ObjectSetText ( "BuyLimit_SL", "<< "+"↑↑↑SL", 10, "Arial" );
- //红色区域
- ObjectCreate ( "Red_Rectangle", OBJ_RECTANGLE, 0, iTime(NULL,PERIOD_D1,0)+3600*(24), YesOpen-(YesOpen-YesClose)/2,iTime(NULL,PERIOD_D1,0)+3600*(24+12),YesClose-(YesOpen-YesClose)/2);
- ObjectSet ( "Red_Rectangle", OBJPROP_COLOR, Red );
- ObjectSet ( "Red_Rectangle", OBJPROP_BACK, 0 );//方块边沿变为线条
- //大中小阴阳
- ObjectCreate ( "Text_ShiTi", OBJ_TEXT, 0, iTime(NULL,PERIOD_D1,1)+3600*12, YesLow-0.0010 );
- ObjectSet ( "Text_ShiTi", OBJPROP_COLOR, Maroon );
- ObjectSetText ( "Text_ShiTi", "大阴", 16, "Arial" );
- //
- }
- return(0);
- }
复制代码
|
|