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

您現(xiàn)在的位置:程序化交易>> 期貨公式>> 文華財經(jīng)>> 文華財經(jīng)知識>>正文內(nèi)容

[求助]能不能將下面的轉(zhuǎn)成文華6的主圖指標(biāo)? [文華財經(jīng)]

  • 咨詢內(nèi)容: ?//+------------------------------------------------------------------+//|? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 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

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

 

有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友

可聯(lián)系技術(shù)人員 QQ: 511411198  點(diǎn)擊這里給我發(fā)消息或微信:cxhjy888 進(jìn)行 有償 編寫!不貴!點(diǎn)擊查看價格!


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
主站蜘蛛池模板: 在线高清一级欧美精品 | 一级特黄aaa大片免费看 | 天堂网一区 | 成年片色大黄全免费 | 91av片| 成人免费看黄网址 | 成人羞羞视频在线观看 | 亚洲欧美日韩不卡 | 欧美性生交xxxxx久久久 | 久草首页在线观看 | 亚洲综合涩 | 久久亚洲一区二区 | 日本三级黄视频 | 欧美成人免费一级人片 | 美女黄色片网站 | 欧美视频在线第一页 | 国产成人精品亚洲一区 | 亚洲国产91 | 日日操夜夜骑 | 美国大黄一片免费看 | 人成免费在线视频 | 无遮挡高清一级毛片免费 | 国产午夜视频在永久在线观看 | 99精品全国免费观看视频.. | 国产大片一区 | 午夜宅男宅女的免费网站 | 乱肉合集乱篇小说 | 一级特黄特色的免费大片视频 | 亚洲日本中文字幕一本 | 欧美日韩国产成人综合在线影院 | 免费中文字幕在线观看 | 成人美女隐私免费 | 色香蕉在线观看 | 无遮免费网站在线入口 | 最近中文免费字幕8 | 色视频在线 | 高h喷水荡肉爽文各种场合 高h喷水荡肉爽文np欲 | 日本欧美日韩 | 色网站视频 | 九九在线精品 | 亚洲 欧美 日韩 在线 |