大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频75-大伊香蕉在线精品视频人碰人

您現在的位置:程序化交易>> 期貨公式>> 文華財經>> 文華財經知識>>正文內容

[求助]能不能將下面的轉成文華6的主圖指標? [文華財經]

  • 咨詢內容: ?//+------------------------------------------------------------------+//|? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? WATR.mq4? |//|? ? ? ? ? ? ? ? ? ? ? Written WizardSerg under article konkop in? |//|? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "Modern trading" #4/2001? |//|? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? http://www.wizardserg.inweb.ru? |//|? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [email protected]? |//+------------------------------------------------------------------+#property copyright "Written WizardSerg under article konkop in <Modern trading> #4/2001"#property link? ? ? "http://www.wizardserg.inweb.ru"http://----#property indicator_chart_window#property indicator_buffers 2#property indicator_color1 Coral#property indicator_color2 DodgerBlue//---- input parametersextern int? ? WATR_K = 10;extern double WATR_M = 4.0;extern int? ? ATR = 21;//---- buffersdouble ExtMapBufferUp[];double ExtMapBufferDown[];//+------------------------------------------------------------------+//| Custom indicator initialization function? ? ? ? ? ? ? ? ? ? ? ? ?|//+------------------------------------------------------------------+int init()? {??? ?IndicatorBuffers(2);??? ?SetIndexBuffer(0, ExtMapBufferUp);?? ?ArraySetAsSeries(ExtMapBufferUp, true);? ? ??? ?SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2);? ?SetIndexBuffer(1, ExtMapBufferDown);?? ?ArraySetAsSeries(ExtMapBufferDown, true);? ? ??? ?SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 2);? ?IndicatorShortName("WATR(" + WATR_K + ", " + WATR_M + ")");?? ?SetIndexLabel(0, "WATR_Up");? ?SetIndexLabel(1, "WATR_Dn");? ??? ?return(0);?? }//+------------------------------------------------------------------+//| Custom indicator deinitialization function? ? ? ? ? ? ? ? ? ? ? ?|//+------------------------------------------------------------------+int deinit()? {//----? ?return(0);? }//+------------------------------------------------------------------+//| Custom indicator function? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |//+------------------------------------------------------------------+bool AntiTrendBar(int i)? {? ?bool res = (TrendUp(i) && (Close[i] < Open[i])) ||? ? ? ? ?? ? ? ? ? ? ? (!TrendUp(i) && (Close[i] > Open[i]));? ??? ?return(res);? }//+------------------------------------------------------------------+//| Custom indicator function? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |//+------------------------------------------------------------------+double CalcIndicValue(int i, bool trend)? {? ?double res = Close[i];??? ?if(trend)? ? ? ?res -= (WATR_K*Point + WATR_M*iATR(NULL, 0, ATR, i));? ?else? ? ? ?res += (WATR_K*Point + WATR_M*iATR(NULL, 0, ATR, i));? ? ? ??? ?return(res);? }//+------------------------------------------------------------------+//| Custom indicator function? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |//+------------------------------------------------------------------+bool TrendUp(int i)? {? ?return((Close[i+1] > ExtMapBufferUp[i+1]) &&?? ? ? ? ? (ExtMapBufferUp[i+1] != EMPTY_VALUE));? }//+------------------------------------------------------------------+//| Custom indicator iteration function? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |//+------------------------------------------------------------------+int start()? {? ?int limit;? ?int counted_bars = IndicatorCounted();//---- 鐿耠邃龕?鐿聹栩囗睇?徉?狍溴?镥皰聹栩囗//---- 镥疴鑠 珥圜屙楨 檜滂賅蠑疣 == 鰣礤-1 point,?//? ? ?蠑 羼螯 聹栩噱?蝠屙?忸聃鈿?? ?ExtMapBufferUp[Bars-1] = Close[Bars-1] - WATR_K*Point;? ? ?// limit = (counted_bars > 0) ? (Bars - counted_bars) : (Bars - 1);? ?limit = Bars - counted_bars;? ?if(counted_bars==0) limit-=2;//---- 鋮眍忭鉍 鯊覿? ?for(int i = limit; i >= 0; i--)? ? ?{? ? ? ?if(AntiTrendBar(i))? ? ? ? ?{? ? ? ? ? ?ExtMapBufferUp[i] = ExtMapBufferUp[i+1];? ? ? ? ? ??? ? ? ? ? ?ExtMapBufferDown[i] = ExtMapBufferDown[i+1];? ? ? ? ? ??? ? ? ? ?}? ? ? ?else? ? ? ? ?{? ? ? ? ? ?if(TrendUp(i))? ? ? ? ? ? ?{? ? ? ? ? ? ? ?ExtMapBufferUp[i] = CalcIndicValue(i, true);? ? ? ? ? ? ? ?if(ExtMapBufferUp[i] < ExtMapBufferUp[i+1])? ? ? ? ? ? ? ? ? ?ExtMapBufferUp[i] = ExtMapBufferUp[i+1];? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? ? ? ? ? ? ? ?ExtMapBufferDown[i] = EMPTY_VALUE;?? ? ? ? ? ? ?}? ? ? ? ? ?else? ? ? ? ? ? ?{? ? ? ? ? ? ? ?ExtMapBufferDown[i] = CalcIndicValue(i, false);? ? ? ? ? ? ? ? ? ? ? ??? ? ? ? ? ? ? ?if(ExtMapBufferDown[i] > ExtMapBufferDown[i+1])? ? ? ? ? ? ? ? ? ?ExtMapBufferDown[i] = ExtMapBufferDown[i+1];? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? ? ? ? ? ? ? ?ExtMapBufferUp[i] = EMPTY_VALUE;? ? ? ? ? ? ?}? ? ? ? ?}? ? ? ?// 镥皰皴麇龕 ?鰣眍?? ? ? ? ? ? ? ??? ? ? ?if(TrendUp(i) && (Close[i] < ExtMapBufferUp[i]))? ? ? ? ?{? ? ? ? ? ?ExtMapBufferDown[i] = CalcIndicValue(i, false);??? ? ? ? ? ?ExtMapBufferUp[i] = EMPTY_VALUE;? ? ? ? ?}? ? ? ?if((!TrendUp(i)) && (Close[i] > ExtMapBufferDown[i]))? ? ? ? ?{? ? ? ? ? ?ExtMapBufferUp[i] = CalcIndicValue(i, true);? ? ? ? ? ? ? ? ??? ? ? ? ? ?ExtMapBufferDown[i] = EMPTY_VALUE;?? ? ? ? ?}? ? ?}? ?return(0);? }//+------------------------------------------------------------------+

    ?

    ?來源:程序化99

  • 文華技術人員: ?wh6是基礎看盤軟件,不支持循環這樣復雜的思路的
    您可以具體說明下思路,我們看下是否可以直接編寫

 

有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友

可聯系技術人員 QQ: 511411198  點擊這里給我發消息或微信:cxhjy888 進行 有償 編寫!不貴!點擊查看價格!


【字體: 】【打印文章】【查看評論

相關文章

    沒有相關內容
主站蜘蛛池模板: 亚洲国产成人久久77 | 久久中文字幕一区二区三区 | 999精品视频在线 | 狠狠色丁香婷综合久久 | 国产v欧美v日韩在线观看 | 日日摸夜夜添夜夜添一区二区 | 欧美成人免费一级人片 | 久久久久久免费视频 | 久久久久久久久免费影院 | 呦女亚洲一区精品 | 免费看片aⅴ免费大片 | 亚洲综合干 | 久青草国产在线视频亚瑟影视 | 深夜福利视频在线一区 | 一级bbbbbbbbb毛片 | 亚洲欧美日产综合一区二区三区 | 一区二区不卡不卡一卡 | 看欧美一级片 | 亚洲短视频在线观看 | 很黄的网站在线观看 | 欧美成人精品福利在线视频 | aⅴ一区二区三区 | 免费黄色福利视频 | 四虎影视免费 | 日韩欧美精品一区二区 | 国产福利不卡视频在免费 | 亚洲图片欧美视频 | 欧美13一14周岁a在线播放 | 亚洲九九精品 | 日日日日操 | 日本一级特黄a大片在线 | 在线综合网 | 中文字幕在线精品不卡 | www久久爱com| 美日韩黄色片 | 日韩欧美小视频 | 青草伊伊| 中国jizz日本 | 久久久亚洲欧洲日产国码二区 | 成人影院高清在线观看免费网站 | 色一情一乱一伦麻豆 |