COCO研究院

 找回密碼
 註冊
搜索
樓主: wangyes53

紅買綠賣騙術

  [複製鏈接]
發表於 10-10-24 22:00 | 顯示全部樓層
感謝大大的解析! ----
發表於 10-10-27 07:53 | 顯示全部樓層
大家參考一下,ema並不是非常正確
MT4 code

#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_color2 Blue
#property indicator_color3 Red
#property indicator_color4 Blue

extern int Hours_START;
extern int Hours_FINISH;

//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
//----
int ExtCountedBars=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//|------------------------------------------------------------------|
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_HISTOGRAM, 0, 1, Red);
   SetIndexBuffer(0, ExtMapBuffer1);
   SetIndexStyle(1,DRAW_HISTOGRAM, 0, 1, Blue);
   SetIndexBuffer(1, ExtMapBuffer2);
   SetIndexStyle(2,DRAW_HISTOGRAM, 0, 3, Red);
   SetIndexBuffer(2, ExtMapBuffer3);
   SetIndexStyle(3,DRAW_HISTOGRAM, 0, 3, Blue);
   SetIndexBuffer(3, ExtMapBuffer4);
//----
   SetIndexDrawBegin(0,10);
   SetIndexDrawBegin(1,10);
   SetIndexDrawBegin(2,10);
   SetIndexDrawBegin(3,10);
//---- indicator buffers mapping
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexBuffer(2,ExtMapBuffer3);
   SetIndexBuffer(3,ExtMapBuffer4);
//---- initialization done
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- TODO: add your code here
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+

bool withinPeriod()
{
         
         int h = TimeHour( CurTime() );
         
         return (  h>=Hours_START && h<=Hours_FINISH );      
} //withiPERIOD


void setColors()
{
       if (withinPeriod())
       {  
         SetIndexStyle(0,DRAW_HISTOGRAM, 0, 1, Red);
         SetIndexBuffer(0, ExtMapBuffer1);
         SetIndexStyle(1,DRAW_HISTOGRAM, 0, 1, Blue);
         SetIndexBuffer(1, ExtMapBuffer2);
         SetIndexStyle(2,DRAW_HISTOGRAM, 0, 3, Red);
         SetIndexBuffer(2, ExtMapBuffer3);
         SetIndexStyle(3,DRAW_HISTOGRAM, 0, 3, Blue);
         SetIndexBuffer(3, ExtMapBuffer4);
       }
       else
       {
         SetIndexStyle(0,DRAW_HISTOGRAM, 0, 1, Lime);
         SetIndexBuffer(0, ExtMapBuffer1);
         SetIndexStyle(1,DRAW_HISTOGRAM, 0, 1, Lime);
         SetIndexBuffer(1, ExtMapBuffer2);
         SetIndexStyle(2,DRAW_HISTOGRAM, 0, 3, Lime);
         SetIndexBuffer(2, ExtMapBuffer3);
         SetIndexStyle(3,DRAW_HISTOGRAM, 0, 3, Lime);
         SetIndexBuffer(3, ExtMapBuffer4);
       }
} //setColors


// THIS IS LEFT UNTOUCHES AS IN THE ORIGINAL INDICATOR
int start()
  {
   double haOpen, haHigh, haLow, haClose;
   if(Bars<=10) return(0);
   ExtCountedBars=IndicatorCounted();
//---- check for possible errors
   if (ExtCountedBars<0) return(-1);
//---- last counted bar will be recounted
   if (ExtCountedBars>0) ExtCountedBars--;
   int pos=Bars-ExtCountedBars-1;
   while(pos>=0)
     {
      haOpen=(ExtMapBuffer3[pos+1]+ExtMapBuffer4[pos+1])/2;
      haClose=(Open[pos]+High[pos]+Low[pos]+Close[pos])/4;
      haHigh=MathMax(High[pos], MathMax(haOpen, haClose));
      haLow=MathMin(Low[pos], MathMin(haOpen, haClose));
      if (haOpen<haClose)
        {
         ExtMapBuffer1[pos]=haLow;
         ExtMapBuffer2[pos]=haHigh;
        }
      else
        {
         ExtMapBuffer1[pos]=haHigh;
         ExtMapBuffer2[pos]=haLow;
        }

      ExtMapBuffer3[pos]=haOpen;
      ExtMapBuffer4[pos]=haClose;
           pos--;
     }
//----
   return(0);
  }
發表於 10-10-27 08:07 | 顯示全部樓層
不會貼圖,有點懶的弄,看的懂的請自己看
發表於 10-10-27 12:27 | 顯示全部樓層
別人的程式,用盤整的區段來show圖
自己的程式,用趨勢的區段來show圖
發表於 10-10-27 15:30 | 顯示全部樓層
回復 48# linchiyh


真服了寫 MT4 的人搞工的要命
發表於 10-10-28 05:58 | 顯示全部樓層
我會傳圖了 ^^不得不程認mt4這麼搞工
可是孕含了龐大的資源

aaa.jpg
aaa.jpg
發表於 10-11-3 19:06 | 顯示全部樓層
如果一直變來變去時就一下買一下賣~
看來也不是很好的方法~
發表於 10-11-14 04:20 | 顯示全部樓層
好棒的圖
不知道邏輯是什麼
發表於 10-11-14 11:00 | 顯示全部樓層
謝謝分享,以後就不會上當了
發表於 10-11-17 11:34 | 顯示全部樓層
前陣子看到廣告真的覺的很神,但仔細一想就覺的有問題,照這種積效來看,根本不用出
來賣軟體,但又看不出破碇,看到大大的解說才發現原來是障眼法,感謝大大破解,讓很
多人免花冤枉錢。
發表於 10-11-22 14:06 | 顯示全部樓層
先收下了~ 謝謝分享
發表於 10-11-28 23:10 | 顯示全部樓層
~~感謝分享~~
發表於 10-11-29 07:33 | 顯示全部樓層
單一指標似乎無法窺其全貌 最終脫離不了最基本的量價
發表於 10-11-30 12:47 | 顯示全部樓層
盤整真是趨勢的最大敵人. 有沒有人可以解決呢?
發表於 10-11-30 12:50 | 顯示全部樓層
不會啊, 那些搞套利的, 或是自營外資等法人的進出, 沒聽說他們在看K線的. 因為K線就是他們畫的.
似乎只有 ...
wldtw2008 發表於 10-7-20 10:00 AM



    那我們這些靠k線的人, 有可能賺嗎?
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

手機版|Archiver|站長信箱|廣告洽詢|COCO研究院

GMT+8, 24-4-19 12:08

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 | AI繪圖AI超擬真美女AI beauty AI Stable DiffusionAI正妹AI Lookbook