人人爽天天爽夜夜爽qc-人人爽天天爽夜夜爽曰-人人天天爱天天做天天摸-人人天天夜夜-色网站在线-色网站在线看

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

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

  • 咨詢內容: ?//+------------------------------------------------------------------+//|? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? WATR.mq4? |//|? ? ? ? ? ? ? ? ? ? ? Written WizardSerg under article konkop in? |//|? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "Modern trading" #4/2001? |//|? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? http://www.wizardserg.inweb.ru? |//|? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? wizardserg@mail.ru? |//+------------------------------------------------------------------+#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 進行 有償 編寫!不貴!點擊查看價格!


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 人人澡人人插 | 日本三级全黄三级三级三级口周 | 国产一级特黄一级毛片 | 全黄冷激性性视频 | 大杳焦伊人久久综合热 | 国产1卡2卡三卡四卡网站 | 欧美国产日韩久久久 | 120秒视频高清观看免费 | 欧美超高清在线观看 | 最近日本中文字幕免费完整 | 日日a.v拍夜夜添久久免费 | 日批免费观看视频 | 国产精品日韩专区 | 进来综合网 | 日韩伦理一区二区三区 | 久久久久久88色愉愉 | 狠狠老司机 | 欧美一级高清片免费一级 | 久久精品视频一区 | 成人永久福利在线观看不卡 | 亚洲男人影院 | 8x成人永久在线观看视频 | 一个人免费观看日本www视频 | 免费人成在线观看 | 日韩一区二区三区视频在线观看 | 亚洲欧美日韩专区一 | jizz日本zzz日本老师水 | 蜜臀91精品国产高清在线观看 | 亚洲欧美日韩精品在线 | 午夜视频在线观看国产 | 日韩手机在线视频 | 午夜视频免费看 | 亚洲社区在线观看 | 国产成人高清亚洲一区久久 | 午夜影视体验区 | 久久精品视 | 两性色午夜视频自由成熟的性 | 天天做日日爱 | 亚洲伦理在线 | 看片在线 | 国产黄大片在线观看视频 |