• <small id='i6dfxm8m'></small><noframes id='sopvptcf'>

    <legend id='clj44ekq'><style id='lbld5yuu'><dir id='rlj9rgs2'><q id='14caue4s'></q></dir></style></legend>
    <i id='fis1gwit'><tr id='hiin2v7v'><dt id='6huqcryc'><q id='b0t7rijj'><span id='z4fs6wmo'><b id='l2631fdc'><form id='lv9c4rb3'><ins id='63bzcbfs'></ins><ul id='lbslwwvp'></ul><sub id='m334wsa0'></sub></form><legend id='8sfik3u4'></legend><bdo id='v9j01hqu'><pre id='v33kr78e'><center id='zd0gxbe7'></center></pre></bdo></b><th id='vnwg0vaj'></th></span></q></dt></tr></i><div id='3muei182'><tfoot id='wiqbxvcl'></tfoot><dl id='7bob3103'><fieldset id='1ft50j3y'></fieldset></dl></div>
    <tfoot id='0mwgfned'></tfoot>
      当前位置: 牛股吴粉胡网 > 股票公式指标 > 零基础学习编写股票指标005,均线、MACD金叉及条件叠加的编写

      零基础学习编写股票指标005,均线、MACD金叉及条件叠加的编写

      2020-04-18 0条评论

      大[da]家[jia]好[hao]!我[wo]是[shi]股[gu]市[shi]帅[shuai]锅[guo]。我[wo]的[de]100篇[pian]连[lian]载[zai]承[cheng]诺[nuo]进[jin]行[xing]中[zhong],今[jin]天[tian]更[geng]新[xin]第[di]5篇[pian],应[ying]该[gai]说[shuo]前[qian]面[mian]4篇[pian]的[de]反[fan]馈[kui]效[xiao]果[guo]都[du]不[bu]错[cuo],平[ping]均[jun]每[mei]篇[pian]收[shou]藏[cang]量[liang]超[chao]过[guo]150,确[que]确[que]实[shi]实[shi]零[ling]基[ji]础[chu]的[de]人[ren],也[ye]能[nen]看[kan]得[de]懂[dong],同[tong]时[shi]也[ye]能[nen]对[dui]照[zhao]着[zhou]教[jiao]程[cheng]来[lai]练[lian]习[xi]演[yan]练[lian]。接[jie]下[xia]来[lai]为[wei]大[da]家[jia]介[jie]绍[shao]"[股[gu]票[piao]手[shou]机[ji]版[ban]公[gong]式[shi]]概[gai]述[shu]零[ling]基[ji]础[chu]学[xue]习[xi]编[bian]写[xie]股[gu]票[piao]指[zhi]标[biao]005,均[jun]线[xian]、MACD金[jin]叉[cha]及[ji]条[tiao]件[jian]叠[die]加[jia]的[de]编[bian]写[xie]"不[bu]明[ming]白[bai]的[de]来[lai]看[kan]看[kan]呀[ya]
      零[ling]基[ji]础[chu]学[xue]习[xi]编[bian]写[xie]股[gu]票[piao]指[zhi]标[biao]005,均[jun]线[xian]、MACD金[jin]叉[cha]及[ji]条[tiao]件[jian]叠[die]加[jia]的[de]编[bian]写[xie]


      现[xian]在[zai]中[zhong]小[xiao]学[xue]生[sheng]编[bian]程[cheng]培[pei]训[xun]课[ke]程[cheng]非[fei]常[chang]火[huo]爆[bao],其[qi]实[shi]锻[duan]炼[lian]的[de]是[shi]思[si]维[wei]能[nen]力[li],而[er]我[wo]的[de]教[jiao]程[cheng],主[zhu]要[yao]是[shi]实[shi]用[yong]技[ji]能[nen]教[jiao]程[cheng],让[rang]大[da]家[jia]多[duo]一[yi]种[zhong]技[ji]能[nen],或[huo]许[xu]等[deng]我[wo]更[geng]新[xin]到[dao]100篇[pian]的[de]时[shi]候[hou],把[ba]所[suo]有[you]的[de]文[wen]章[zhang]聚[ju]集[ji]到[dao]一[yi]起[qi],可[ke]能[nen]就[jiu]是[shi]一[yi]本[ben]书[shu]呢[ne]。


      前[qian]面[mian]的[de]4篇[pian]教[jiao]程[cheng],我[wo]们[men]学[xue]了[liao]几[ji]项[xiang]内[na]容[rong]:


      001输[shu]出[chu]价[jia]格[ge]曲[qu]线[xian](用[yong]到[dao]CLOSE,OPEN,HIGH,LOW)


      002输[shu]出[chu]价[jia]格[ge]均[jun]线[xian](演[yan]示[shi]了[liao]做[zuo]一[yi]个[ge]主[zhu]图[tu]指[zhi]标[biao],用[yong]到[dao]MA简[jian]单[dan]移[yi]动[dong]平[ping]均[jun]函[han]数[shu])


      003用[yong]涨[zhang]跌[die]幅[fu]股[gu]过[guo]滤[lv]股[gu]票[piao](学[xue]会[hui]了[liao]赋[fu]值[zhi],用[yong]到[dao]REF引[yin]用[yong]函[han]数[shu])


      004过[guo]滤[lv]N天[tian]内[na]存[cun]在[zai]涨[zhang]停[ting]板[ban]的[de]股[gu]票[piao](学[xue]会[hui]了[liao]填[tian]写[xie]参[can]数[shu]区[qu],用[yong]到[dao]EXIST存[cun]在[zai]函[han]数[shu])。


      下[xia]次[ci]有[you]必[bi]要[yao]的[de]话[hua],可[ke]以[yi]做[zuo]一[yi]个[ge]目[mu]录[lu],方[fang]便[bian]大[da]家[jia]查[cha]找[zhao]内[na]容[rong]。


      那[na]么[me]在[zai]上[shang]一[yi]篇[pian]文[wen]章[zhang]里[li],我[wo]就[jiu]和[he]大[da]家[jia]说[shuo]过[guo],本[ben]篇[pian]文[wen]章[zhang]要[yao]教[jiao]大[da]家[jia]如[ru]何[he]叠[die]加[jia]条[tiao]件[jian],在[zai]此[ci]之[zhi]前[qian]呢[ne],我[wo]们[men]先[xian]来[lai]学[xue]一[yi]个[ge]另[ling]外[wai]的[de]内[na]容[rong],大[da]家[jia]都[du]比[bi]较[jiao]关[guan]心[xin]均[jun]线[xian]金[jin]叉[cha]、死[si]叉[cha]怎[zen]么[me]编[bian]写[xie]?MACD指[zhi]标[biao]的[de]金[jin]叉[cha]、死[si]叉[cha]怎[zen]么[me]编[bian]写[xie]?


      如[ru]果[guo]学[xue]会[hui]了[liao]金[jin]叉[cha]和[he]死[si]叉[cha],我[wo]们[men]就[jiu]可[ke]以[yi]现[xian]学[xue]现[xian]用[yong],用[yong]金[jin]叉[cha]和[he]死[si]叉[cha]来[lai]过[guo]滤[lv]股[gu]票[piao]了[liao],确[que]实[shi]是[shi]这[zhe]样[yang]的[de],所[suo]以[yi]我[wo]把[ba]简[jian]单[dan]易[yi]学[xue]和[he]有[you]用[yong]的[de]内[na]容[rong],都[du]放[fang]在[zai]前[qian]面[mian],并[bing]结[jie]合[he]案[an]例[li]来[lai]教[jia股票手机版公式o]。


      两[liang]条[tiao]线[xian]交[jiao]叉[cha]的[de]函[han]数[shu]是[shi]:CROSS


      用[yong]法[fa]:CROSS(A,B) 表[biao]示[shi]当[dang]A从[cong]下[xia]方[fang]向[xiang]上[shang]穿[chuan]过[guo]B


      例[li]如[ru]:CROSS(MA(CLOSE,5),MA(CLOSE,10)) 表[biao]示[shi]5均[jun]线[xian]与[yu]10均[jun]线[xian]交[jiao]金[jin]叉[cha]


      在[zai]上[shang]面[mian]这[zhe]句[ju]代[dai]码[ma]里[li],初[chu]学[xue]的[de]朋[peng]友[you]看[kan]起[qi]来[lai]括[kuo]号[hao]有[you]点[dian]多[duo],其[qi]实[shi]很[hen]清[qing]晰[xi],MA(CLOSE,5)代[dai]替[ti]了[liao]A,MA(CLOSE,10)代[dai]替[ti]了[liao]B。那[na]么[me]大[da]家[jia]思[si]考[kao]一[yi]下[xia],如[ru]果[guo]我[wo]们[men]用[yong]赋[fu]值[zhi]的[de]方[fang]式[shi],是[shi]不[bu]是[shi]可[ke]以[yi]把[ba]代[dai]码[ma]写[xie]的[de]更[geng]清[qing]晰[xi]一[yi]些[xie]?我[wo]们[men]试[shi]一[yi]下[xia]:


      ---------------------------


      A:=MA(CLOSE,5);


      B:=MA(CLOSE,10);


      CROSS(A,B);


      -----------------------------


      这[zhe]三[san]句[ju]代[dai]码[ma],意[yi]思[si]很[hen]简[jian]单[dan],把[ba]A赋[fu]值[zhi]为[wei]5均[jun]线[xian],把[ba]B赋[fu]值[zhi]为[wei]10均[jun]线[xian],5均[jun]线[xian]上[shang]穿[chuan]10均[jun]线[xian],也[ye]就[jiu]是[shi]金[jin]叉[cha],如[ru]果[guo]死[si]叉[cha]怎[zen]么[me]编[bian]?那[na]就[jiu]是[shi]10均[jun]线[xian]上[shang]穿[chuan]5均[jun]线[xian],把[ba]CROSS(A,B);改[gai]为[wei]CROSS(B,A);就[jiu]行[xing]了[liao]股票手机版公式。是[shi]不[bu]是[shi]很[hen]简[jian]单[dan]?


      如[ru]果[guo]我[wo]们[men]直[zhi]接[jie]用[yong]上[shang]面[mian]的[de]三[san]句[ju]代[dai]码[ma],做[zuo]成[cheng]一[yi]个[ge]选[xuan]股[gu]过[guo]滤[lv]公[gong]式[shi]的[de]话[hua],就[jiu]是[shi]过[guo]滤[lv]当[dang]天[tian]5日[ri]线[xian]和[he]10日[ri]线[xian]金[jin]叉[cha]的[de]股[gu]票[piao]。我[wo]们[men]来[lai]测[ce]试[shi]下[xia]:


      然[ran]后[hou]用[yong]这[zhe]个[ge]公[gong]式[shi],进[jin]行[xing]综[zong]合[he]选[xuan]股[gu],综[zong]合[he]选[xuan]股[gu]还[huai]不[bu]会[hui]用[yong]的[de]朋[peng]友[you],请[qing]参[can]考[kao]003或[huo]004教[jiao]程[cheng],基[ji]础[chu]的[de]方[fang]法[fa],这[zhe]里[li]就[jiu]不[bu]浪[lang]费[fei]版[ban]面[mian]了[liao],自[zi]己[ji]去[qu]看[kan]下[xia]。选[xuan]到[dao]的[de]股[gu]票[piao]是[shi]这[zhe]个[ge]图[tu]形[xing]的[de]:


      是[shi]不[bu]是[shi]选[xuan]出[chu]来[lai]的[de]股[gu]票[piao]正[zheng]好[hao]是[shi]当[dang]天[tian]5日[ri]线[xian]和[he]10日[ri]线[xian]金[jin]叉[cha]?


      那[na]么[me]MACD金[jin]叉[cha]怎[zen]么[me]编[bian]写[xie]?


      我[wo]们[men]先[xian]从[cong]系[xi]统[tong]自[zi]带[dai]的[de]MACD指[zhi]标[biao]中[zhong],把[ba]MACD的[de]代[dai]码[ma]复[fu]制[zhi]出[chu]来[lai]。


      这[zhe]个[ge]代[dai]码[ma]我[wo]们[men]不[bu]能[nen]直[zhi]接[jie]用[yong],需[xu]要[yao]做[zuo]些[xie]修[xiu]改[gai],因[yin]为[wei]选[xuan]股[gu]公[gong]式[shi]中[zhong],不[bu]允[yun]许[xu]超[chao]过[guo]1个[ge]输[shu]出[chu],而[er]上[shang]面[mian]的[de]代[dai]码[ma]里[li],有[you]3个[ge]输[shu]出[chu]内[na]容[rong](只[zhi]有[you]:表[biao]示[shi]输[shu]出[chu],:=表[biao]示[shi]赋[fu]值[zhi]),另[ling]外[wai]参[can]数[shu]区[qu],分[fen]别[bie]是[shi]12,26,9,我[wo]们[men]直[zhi]接[jie]在[zai]代[dai]码[ma]里[li]设[she]定[ding],修[xiu]改[gai]后[hou]如[ru]下[xia]:


      ------------------------------


      DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);


      DEA:=EMA(DIF,9);


      MACD:=(DIF-DEA)*2;


      {在[zai]此[ci]基[ji]础[chu]上[shang],我[wo]们[men]再[zai]加[jia]一[yi]句[ju]CROSS的[de]代[dai]码[ma],即[ji]DIF上[shang]穿[chuan]DEA,这[zhe]是[shi]金[jin]叉[cha],如[ru]下[xia]:}


      CROSS(DIF,DEA);


      -----------------------------------


      想[xiang]想[xiang]有[you]没[mei]有[you]其[qi]他[ta]方[fang]法[fa],如[ru]果[guo]MACD的[de]值[zhi],原[yuan]来[lai]是[shi]负[fu]数[shu],金[jin]叉[cha]之[zhi]后[hou],MACD变[bian]成[cheng]正[zheng]数[shu]了[liao],这[zhe]里[li]可[ke]以[yi]描[miao]述[shu]为[wei]MACD上[shang]穿[chuan]0轴[zhou],我[wo]们[men]也[ye]可[ke]以[yi]这[zhe]么[me]编[bian]写[xie]:


      ------------------------------------


      DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);


      DEA:=EMA(DIF,9);


      MACD:=(DIF-DEA)*2;


      CROSS(MACD,0);


      ---------------------------------------


      下[xia]面[mian]我[wo]们[men]把[ba]上[shang]面[mian]两[liang]个[ge]代[dai]码[ma]做[zuo]成[cheng]选[xuan]股[gu]公[gong]式[shi],来[lai]进[jin]行[xing]过[guo]滤[lv],看[kan]看[kan]什[shi]么[me]结[jie]果[guo]。


      经[jing]过[guo]测[ce]试[shi],两[liang]个[ge]代[dai]码[ma]选[xuan]股[gu]的[de]结[jie]果[guo]是[shi]一[yi]样[yang]的[de],我[wo]们[men]看[kan]一[yi]下[xia],我[wo]们[men]选[xuan]到[dao]的[de]股[gu]票[piao],MACD是[shi]否[fu]是[shi]刚[gang]刚[gang]金[jin]叉[cha]?


      很[hen]显[xian]然[ran],选[xuan]到[dao]的[de]股[gu]票[piao]是[shi]符[fu]合[he]要[yao]求[qiu]的[de]。


      接[jie]下[xia]来[lai],我[wo]们[men]开[kai]始[shi]进[jin]阶[jie],有[you]些[xie]股[gu]票[piao],5日[ri]线[xian]和[he]10日[ri]线[xian]金[jin]叉[cha]好[hao]几[ji]天[tian]了[liao],MACD开[kai]始[shi]金[jin]叉[cha],也[ye]有[you]相[xiang]反[fan]的[de]情[qing]况[kuang],MACD金[jin]叉[cha]好[hao]几[ji]天[tian]了[liao],5日[ri]线[xian]和[he]10日[ri]线[xian]才[cai]开[kai]始[shi]金[jin]叉[cha]。


      那[na]么[me]如[ru]果[guo]我[wo]们[men]要[yao]求[qiu]5日[ri]线[xian]和[he]10日[ri]线[xian]的[de]金[jin]叉[cha],和[he]MACD金[jin]叉[cha]在[zai]同[tong]一[yi]天[tian]发[fa]生[sheng],我[wo]们[men]怎[zen]么[me]来[lai]编[bian]?


      我[wo]们[men]把[ba]上[shang]面[mian]的[de]代[dai]码[ma]线[xian]都[du]复[fu]制[zhi]下[xia]来[lai]:


      -----------------------------------


      {5均[jun]线[xian]和[he]10均[jun]线[xian]金[jin]叉[cha]}


      A:=MA(CLOSE,5);


      B:=MA(CLOSE,10);


      CROSS(A,B);


      {MACD金[jin]叉[cha]}


      DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);


      DEA:=EMA(DIF,9);


      MACD:=(DIF-DEA)*2;


      CROSS(DIF,DEA);


      ---------------------------------------


      我[wo]们[men]把[ba]上[shang]面[mian]代[dai]码[ma]中[zhong],加[jia]粗[cu]的[de]两[liang]项[xiang]用[yong]AND连[lian]在[zai]一[yi]起[qi],当[dang]然[ran],一[yi]句[ju]代[dai]码[ma]只[zhi]要[yao]一[yi]个[ge]分[fen]号[hao],同[tong]时[shi]AND前[qian]后[hou]都[du]需[xu]要[yao]有[you]空[kong]格[ge],如[ru]下[xia]:


      ---------------------------------------


      {5均[jun]线[xian]和[he]10均[jun]线[xian]金[jin]叉[cha]}


      A:=MA(CLOSE,5);


      B:=MA(CLOSE,10);


      {MACD金[jin]叉[cha]}


      DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);


      DEA:=EMA(DIF,9);


      MACD:=(DIF-DEA)*2;


      CROSS(A,B) AND CROSS(DIF,DEA);


      ------------------------------------------


      我[wo]们[men]用[yong]上[shang]面[mian]的[de]代[dai]码[ma],做[zuo]成[cheng]选[xuan]股[gu]指[zhi]标[biao],进[jin]行[xing]选[xuan]股[gu],怎[zen]么[me]做[zuo]选[xuan]股[gu]指[zhi]标[biao],不[bu]需[xu]要[yao]再[zai]演[yan]示[shi]了[liao]吧[ba]?有[you]疑[yi]问[wen]的[de],先[xian]看[kan]前[qian]面[mian]几[ji]篇[pian]教[jiao]程[cheng],已[yi]经[jing]演[yan]示[shi]了[liao]很[hen]多[duo]次[ci]了[liao]。


      选[xuan]股[gu]结[jie]果[guo],显[xian]然[ran]是[shi]同[tong]一[yi]天[tian]发[fa]生[sheng]了[liao]金[jin]叉[cha]。这[zhe]种[zhong]同[tong]一[yi]天[tian]发[fa]生[sheng]金[jin]叉[cha]的[de],技[ji]术[shu]上[shang]也[ye]叫[jiao]指[zhi]标[biao]共[gong]振[zhen]。


      AND表[biao]述[shu]的[de]是[shi]条[tiao]件[jian]的[de]同[tong]时[shi]符[fu]合[he],同[tong]理[li],如[ru]果[guo]用[yong]OR的[de]话[hua],表[biao]示[shi]条[tiao]件[jian]符[fu]合[he]其[qi]中[zhong]一[yi]项[xiang]即[ji]可[ke],OR的[de]使[shi]用[yong],我[wo]们[men]在[zai]后[hou]面[mian]的[de]文[wen]中[zhong]会[hui]讲[jiang]。


      给[gei]大[da]家[jia]留[liu]个[ge]作[zuo]业[ye],上[shang]面[mian]我[wo]们[men]选[xuan]的[de]是[shi]当[dang]天[tian]同[tong]时[shi]发[fa]生[sheng]金[jin]叉[cha],那[na]么[me]如[ru]果[guo]是[shi]过[guo]去[qu]5天[tian]内[na],其[qi]中[zhong]有[you]一[yi]天[tian]同[tong]时[shi]均[jun]线[xian]及[ji]MACD发[fa]生[sheng]金[jin]叉[cha]的[de]股[gu]票[piao]都[du]要[yao]选[xuan]出[chu]来[lai],该[gai]怎[zen]么[me]编[bian]写[xie]?有[you]兴[xing]趣[qu]尝[chang]试[shi]的[de],可[ke]以[yi]在[zai]评[ping]论[lun]中[zhong]交[jiao]作[zuo]业[ye],我[wo]会[hui]帮[bang]大[da]家[jia]批[pi]改[gai]。如[ru]果[guo]不[bu]会[hui],就[jiu]等[deng]着[zhou]我[wo]出[chu]下[xia]一[yi]篇[pian]教[jiao]程[cheng]吧[ba]。


      先[xian]点[dian]赞[zan],后[hou]收[shou]藏[cang],再[zai]转[zhuan]发[fa],我[wo]是[shi]股[gu]股票手机版公式市[shi]帅[shuai]锅[guo],谢[xie]谢[xie]大[da]家[jia]的[de]捧[peng]场[chang]。



      我觉得此时大家知道"[股票手机版公式]概述零基础学习编写股票指标005,均线、MACD金叉及条件叠加的编写"了吧?早已在上述文章为大伙儿作出了详细介绍,坚信诸位在看了以后应该可以清晰了解哦

      转载请注明来自,本文标题:零基础学习编写股票指标005,均线、MACD金叉及条件叠加的编写
      本文地址:http://www./gupiaogongshizhibiao/1441.html

      标签: 股票手机版公式

        <small id='ld8iao7d'></small><noframes id='hf4zfuin'>

        <i id='r3a1xgma'><tr id='4edi288d'><dt id='6mhvmco4'><q id='hlem77m9'><span id='sb1rkxy0'><b id='01gus1gs'><form id='964w4u0q'><ins id='o73jiinw'></ins><ul id='79fkm512'></ul><sub id='o6peym9d'></sub></form><legend id='9qnpzdn1'></legend><bdo id='jhvsdhe2'><pre id='u16uax1m'><center id='lgwho9qw'></center></pre></bdo></b><th id='1zu699u1'></th></span></q></dt></tr></i><div id='6r3i4pca'><tfoot id='fn9o8y9g'></tfoot><dl id='0gsfuj0k'><fieldset id='pvmadlao'></fieldset></dl></div>
        • <legend id='ih7w0i45'><style id='e65ud6fb'><dir id='f66h13sa'><q id='iocxn0qa'></q></dir></style></legend>
            <tbody id='pcfrcf7e'></tbody>
          <tfoot id='1vlptt8h'></tfoot>

          • 我们需要您来参与下,来添加一个评论吧(●'◡'●)

            评论框
            验证码: 看不清?点击更换

            注:网友评论仅供其表达个人看法,并不代表本站立场。

            1. <legend id='v55etk8h'><style id='nigtf410'><dir id='0ktz9yj4'><q id='9wgfjpmx'></q></dir></style></legend>

              <small id='jo08vuzf'></small><noframes id='aktby2b6'>

                  <tbody id='8duy5qof'></tbody>
                <i id='9u99l1ls'><tr id='whfr6ire'><dt id='8re2d195'><q id='lr8v7zor'><span id='cm5eyi5o'><b id='esz8b1l3'><form id='mx494119'><ins id='wu4ksf0d'></ins><ul id='98y96hhz'></ul><sub id='sunzrjg9'></sub></form><legend id='mh252d6g'></legend><bdo id='u8b5uqgx'><pre id='s4dpts3v'><center id='pl6pibjf'></center></pre></bdo></b><th id='xpscpnhj'></th></span></q></dt></tr></i><div id='bforh9ai'><tfoot id='ec19cqn0'></tfoot><dl id='rbabbtgy'><fieldset id='u2bq0oqy'></fieldset></dl></div>

                <tfoot id='05er7qeq'></tfoot>
                关于我

                欢迎加我的微信号交流

                搜索
                同类文章
                最新评论
                友情链接