Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIK

Программирование

Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIK.
Marobhoti ekutengesa anogona kunyorwa mumutauro chaiwo, wakafanana nekodhi yepurogiramu. QPILE ndechimwe chazvo, chinyorwa chichatarisa mutauro uyu, kuenzanisa mitauro yeQPILE neLUA
, uye kupawo mienzaniso yemarobhoti mumutauro uyu.

General ruzivo nezve QPILE

QPILE chidimbu chinomirira QUIK Programmable Interface uye Logic Environment.

Iyi nhevedzano yemirairo yakadudzirwa neQUIK workstation. Inonyanya kushandiswa kuverenga mutengo wepodfolios yezvivimbiso. Mutauro unoshandiswawo ku:

  • dynamic recalculation yemutengo wezvinhu zvevatengi pane bhuroka desktop uye mumapotfolio avo. Muchiitiko chekupedzisira, mutengo wavo wose unoverengwa zvakare;
  • kutsvaga zviratidzo zvisipo vachishandisa yavo algorithms uye data yekukweretesa margin;
  • kugadzira nzira yekutengeserana yakakodzera.

Mutauro unotsanangura chimiro chetafura: kugadzwa kwemakoroni nemitsara, mafomula. Mukupedzisira, mashandiro emasvomhu, zvinosiyana, data kubva kune mamwe matafura anogona kushandiswa pakuverenga. Iyo kodhi yepurogiramu yakatakurwa kubva kuQUIK server kana kubva kudhisiki yemushandisi inogadziriswa nemuturikiri wemutauro, iyo inoverenga kukosha mumafomula. Matafura eimwe chirongwa ane imwe data sosi, asi kuverenga hakuna kudzokororwa uye haakanganisa kushanda kwehurongwa. Paunenge uchishanda nematafura eQUIK, matafura paQPILE ane mabasa akajairwa. QUIK munzvimbo yebasa ine QPILE kodhi debugger. https://articles.opexflow.com/software-trading/torgovyj-terminal-quik.htm Mutauro unokubvumidza kuti utsanangure matafura matsva ane chimiro chakapihwa, simbisa maseru ane humwe hukoshi, kuverenga minda zvichienderana nemasvomhu uye zvine musoro kutaura. Mushandisi anogashira zviziviso muchimiro chechiratidzo chenzwi kana meseji. Matafura paQPILE anogona kugadziriswa, kudhindwa, kukopwa, kutumirwa kunze kwenyika kuburikidza neODBC uye DDE server. Yekutanga data kubva pamatafura eQUIK:

  • kutengeserana, kusanganisira kuuraya uye kusiri munhu;
  • mirairo, kusanganisira kumira mirairo, ye-over-the-counter trades uye mirairo – mishumo yekutengeserana mukugadzirisa zvibvumirano;
  • “client portfolio”, “tenga/tengesa”
  • data kubva munzvimbo dzevatori vechikamu nemari, maakaundi ekutengesa, chiridzwa.

Matafura akavakirwa paQPILE haagone kuteedzerwa kufaira remavara kuburikidza nemenu yemukati uye kutumirwa kune tekinoroji yekuongorora masisitimu, uye machati haagone kugadzirwa zvichibva pazviri. QPILE-based tables haigone kusefa kana kurongwa.

Kushanda netafura

Kurodha kodhi yepurogiramu, unofanirwa kusarudza menyu masevhisi, wozotevera QPILE zvinyorwa. Iwe unogona zvakare kushandisa musanganiswa Ctrl + F11. Mushure unofanirwa kudzvanya “Wedzera” uye sarudza iyo yaunoda faira. Iine .qpl extension uye zita rayo richaonekwa muAvailable Scripts list.
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIKKana pane kukanganisa muchirongwa, sisitimu ichaita chiziviso mu “Mharidzo Window”, iyo ichange iine zita reyakakanganisika faira uye mutsara nhamba ine kukanganisa. Kana pasina kukundikana kwakawanikwa mufaira, iyo inotevera data icharatidzwa muminda:

  • table name;
  • nhamba yemakoramu nevatengi;
  • rondedzero yezvitupa uye vatengi;
  • runyorwa rwema parameters uye kodhi kodhi yefaira.

Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIKBhatani re “Download munharaunda” richakubvumidza kuti utore tafura kubva mufaira, uye “Ipa kune server” inotumira chirongwa kune server kuitira kuti vese vashandisi vakwanise kuiwana. Kuti ugadzire tafura, tinya Gadzira Tafura. Mu “Available scripts” sarudza purogiramu yaunoda kuita, isa nhamba yemitsara kuburikidza ne “Filter yevatengi”, sarudza makoramu anodiwa uye kutevedzana kwawo.
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIKKumbomira uye kutangazve kuverenga, kutanga kuverenga zvakare uye mune debug mode, kuchengetedza tsananguro kufaira, kuratidza fomula, uye script paramita anowanikwa mune yemukati menyu.

QPILE inogadzira

Data mhando

  • Tambo – tambo.
  • Kaviri inhamba yepoindi inoyangarara.
  • Kuunganidza – muunganidzwa.
  • Mepu – associative array – nhevedzano yezviviri zvinokutendera iwe kuti uwane ruzivo nekiyi.

Matauriro

Iwo arithmetic mashandiro ekuwedzera, kubvisa, kuwanda, kupatsanura anoiswa. Mazwi ane musoro okuti “uye”, “kana”, zvakaenzana, zvakawanda, zvishoma, kusaenzana, kuvakwa kwezvisungo “kana … zvino …” anoshandiswawo.

Mabasa

Mabasa anogona kuwanikwa chero muchirongwa uye ane mazita akasiyana. Pakazara, 18 mapoka emabasa emasvomhu uye mabasa aripo kuti awane kukosha kwematafura uye paramita, associative arrays, rondedzero yematafura, uye mamwe mabasa. Giredhi rekutanga:

  1. Basa reMasvomhu rinokutendera kuti udzose kukosha kwesine, cosine, tangent, cotangent yenharo, kuverenga exponent yenharo, gadzira nhamba isina kurongeka, nezvimwe.
  2. General commands : NEW_GLOBAL kutanga shanduko yepasi rose uye MESSAGE kuvhura mameseji.

Mabasa ekushanda nawo:

  • Kuunganidzwa kwezvinhu (Kuunganidzwa) . Ivo vanokubvumidza kuti ugadzire muunganidzwa mutsva, dzosera iyo inodiwa nhamba yezvinhu, kutsiva kana kuisa iyo yaunoda kukosha.
  • Associative Arrays (MAP) . Batsira kugadzira nekugadzirisa hurongwa.
  • Mafaira – kushanda nemafaira ezvinyorwa, kuchengetedza log-log yepurogiramu. Zita refaira rinogona kunge riine nzira yekuenda nayo.
  • Tambo .
  • Grafu . Mabasa eGET_CANDLE ekuwana data yekenduru uye GET_CANDLE EX kudzosa asociative array.
  • Applications . Kugadzira mirairo uye kuitumira kune iyo yekutengesa system.
  • Tags . Kuvaka kwavo uye kuiswa pachati. Kuwedzera, kudzima rimwe kana ese mavara, kuwana uye kuseta maparamendi eiyo chaiyo label.

Kune zvakare mabasa e:

  1. Kuti uwane mitsara yematafura eQUIK uye rondedzero yezviwanikwa zviripo . Kuwana data retafura yebasa. Izvi zvinosanganisira GET_ITEM kudzosa MAP neGET_NUMBER_OF kudzosa nhamba yezvapinda.
  2. Kushanda netafura inorongwa . Mirairo iyi inoshanda patafura yeOWN. Inoverengwa nemaitiro akajairwa kubva mundima yapfuura uye neaya mabasa. Boka iri rinosanganisira mirairo yekuwedzera, kugadzirisa uye kudzima mutsara une index, uye kujekesa zvachose OWN tafura.

Kuti uwane kukosha kushandisa:

  1. Matafura ekutengeserana kwemazuva ano . Kuwana chekuchinjana ruzivo paramita uchishandisa GET_PARAM (_EX) mirairo.
  2. Quote windows . Kuwana kukosha kwechiridzwa makotesheni.
  3. Matafura ezvinzvimbo nezviridzwa nemari . Kuwana data pane mutengi, firm, chiridzwa, depo account nekodhi.

Basa rebasa – kudzorera zuva remazuva ano rekutengeserana, sangano rekubatanidza, zuva razvino uye nguva, kutarisa mamiriro ekubatanidza, kukanganisa maitiro ekuverenga.

Debugging zvirongwa

Nhanho-nhanho kutonga pamusoro pekushanda kwechirongwa kunoitwa mu “Debug” hwindo. Inovhurwa kubva pane yemukati menyu “Tanga kuverenga mune debug mode”. Inogona zvakare kuvhurwa neiyo breakpoint () command, uye mutsara wechirongwa unozoratidzwa mutsvuku. Iwindo rine minda ine kodhi yepurogiramu uye maitiro akasiyana. Pazasi pehwindo pane mabhatani “Next nhanho”, “Ramba uchiitwa”, “Stop calculation”. Kudzvanya F5 kuchaenderera mberi nekuitwa kwechirongwa, musanganiswa Shift + F5 uchamira kugadzirisa, kiyi yeF10 inotungamira kumutsara unotevera.

QPILE kana LUA?

LUA mutauro mutsva wekugadzira wekugadzira marobhoti ekutengesa. Kufanana neQPILE, inoshandiswa muQUIK terminal. https://articles.opexflow.com/programming/lua.htm Nzvimbo yakatsaurirwa kugadzirwa kwemarobhoti ekutengeserana inoratidza zvakanakira mutauro weLUA pamusoro peQPILE. Saka, inogona kushanda senge isiri-yakaunganidzwa script uye bytecode, yakashongedzerwa nematurusi ekuvandudza uye nechinhu-chakatarisana nehurongwa hwekugadzirisa zvinhu. Zvinhu zvakanyorwa mune mimwe mitauro yekuronga zvinogona kubatana kune LUA zvirongwa. LUA inopa 8 data mhando, kusanganisira metatables. Mutauro weLUA une tambo dzakawanda, nekukurumidza, uye kutengeserana uye zviitiko zvekupedzisira zvine asynchronous. LUA yakajairika kupfuura QPILE, uye akawanda ekuwedzera akanyorerwa iyo.

Mutauro weQPILE hauchashandiswi. Nyanzvi dzemaforamu dzinokurudzira kushandisa LUA. Kunyange zvazvo mapurogiramu anobatsira uye anoshanda achiri kushandiswa.

Zvisinei, mutauro weQPILE uri nyore kana uchienzaniswa neLUA, saka kana usina ruzivo rwekuronga, zviri nani kusarudza QPILE. Mumutauro uyu, unogona kunyora robhoti iri nyore kana usingade kuita macalculation akaoma.

Maitiro ekugadzira robhoti rekutengesa paQPILE?

Kuti ugadzire chipangamazano wekutengesa, iwe uchada zvinotevera zvirongwa:

  1. ITS Quik.
  2. Notepad++ code editor.
  3. Nhungamiro yeQPILE.
  4. XML plugin yekuona kodhi muNotepad++.

Dhawunirodha uye isa zvirongwa izvi. Gonesa syntax yemutauro nekuisa userDefineLang.xml munzira C:\Users\User\AppData\Roaming\Notepad++\
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIKKutanga, ngatitangei inotevera yekutengesa nzira. Iyo script inofanira kuverenga Hi uye Yakadzika kwemakenduru mashoma ekupedzisira miniti yega yega, tarisa mutengo wezvino wechiridzwa. Chinzvimbo chinovhurwa munzira inodiwa kana mutengo wechiridzwa wasvika pahupamhi kana hushoma kukosha kwenguva. Kana chiratidzo chepfupi chikagamuchirwa, nzvimbo yakareba inovharwa otomatiki. Iyo robhoti inoshandisa iyo GAZP chishandiso, iyo nguva yakatarwa inoiswa ku1 min. Iyo hi-yakaderera kuyerwa kudzika kwakaiswa kumakenduru mashanu. Kuti upinde Murefu, mutemo unotarwa uye mharadzano yemutengo wezvino weiyo yakanyanya kukosha yenguva. The robhoti achapinda Pfupi kana iyezvino mutengo kuyambuka hushoma kukosha aya 5 makenduru. Nyora chivharo chekodhi muNotepad ++ ine zvigadziriso zvekutanga uye server zuva uye nguva. Iyi kodhi inoratidzwa mumufananidzo uri pazasi.
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIKMitsara mina yekutanga yekodhi inoumba musoro wechirongwa. Pakati pemitsara 6 uye 44 muviri wepurogiramu, iyo ine zviri mukati marobhoti. Mitsetse 7 – 12 ine zvigadziriso zvevashandisi, izvo zvinosanganisira makodhi echiridzwa, boka uye mutengi, iyo account nhamba paMICEX. Aya maitiro haachinje panguva yekuitwa kwechirongwa. Mitsetse 13 – 16 ndiyo yekutanga kukosha kwezvakasiyana. Ivo vanozosetwazve ku zero pane imwe neimwe iteration pass. Mitsetse 17 – 21 ine chiratidzo chekushandisa server zuva uye nguva. Iyi data inopfuudzwa kune DATETIME basa uye inoshandurwa kuita mavara emhando. Mitsara 22 – 29 inotumira data yakagamuchirwa kutafura. Iyo kodhi inofanira kuchengetwa uye kuwedzera kweqpl kunofanirwa kutsanangurwa.
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIKVhura chirongwa muQUIK nekudzvanya Ctrl+F10 uye kusarudza iyo yakagadzirwa qpl faira. Shandisa Ctrl+F11 musanganiswa kuvhura iyo “Shanda nePortfolios” hwindo uye isa iyo portfolio yekuverenga nguva kusvika maminetsi mashanu. Dzvanya Ctrl+F12 kuseta makoramu kuti aratidze mutafura. Mufananidzo wacho unoratidza mhedzisiro yebasa rerobhoti.
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIKNgatiwedzerei mamwe mashoma mabasa uye mamiriro kuchirongwa chedu.
Iyo “User settings” block inowedzerwa neNUMBER uye INTERVAL zvinosiyana, izvo zvichashandiswa mubasa rekuwana yekupedzisira N bars. Iyo DATETIME basa inoseta sevha zuva uye nguva, uye yazvino zuva uye nguva mabasa CURDATE uye CURTIME anodanwa kubva kwairi. Nguva yemazuva ano inoshandurwa kuva nhamba pamutsara 24. Mutsara wechi26 unoisa nguva yekuti algorithm iite kubva 10:00:01 kusvika 18:40:00 UTC.
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIK
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIK
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIKMutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIKKazhinji, zviratidzo, oscillators, nhamba dzekuverenga dzinoverengwa nekupedzisira N makenduru echati. QPILE haina basa rekuunganidza nhamba yemakenduru N nguva dzakapfuura sezvizvi, asi pane GET_CANDLE basa rinowana makenduru ari pachati nezuva uye nguva mumutauro wemavara. Yedu kodhi ine basa rekutora yekupedzisira N mabara OHLC (). Inogadzira muunganidzwa une maparameter emakenduru ekupedzisira akaiswa muCOLLECTION list. Iyo purogiramu inotarisa kukosha kwe INTERVAL, uye kana ikasawira mukati mehuwandu 0 … 60, meseji inoratidzwa kuti kukosha hakuenderane neyakabvumidzwa renji. A MAP muunganidzwa nemakenduru anogadzirwa mumutsara 88. A FOR loop kuvhota chati kusvika pahudzamu hunodiwa ne INTERVAL nhanho kubva patsva kusvika kukenduru yekare. Mumutsara we90, mushure mekunge kutenderera kwaziviswa, robhoti inodzokera kumashure. Kana wawana kenduru neGET_CANDLE, isa muchikamu cheBARLIST uchishandisa INSERT_COLLECTION_TEAM maitiro. Nekuda kwekushanda kweOHLC() command, BARLIST inozadzikiswa nemakenduru ekupedzisira kubva kuchiridzwa chati muhuwandu hweNUMBER. Huwandu hwezvinhu zviri muunganidzwa hunokumbirwa neGET_COLLECTION_COUNT() murairo uye zvinoshumwa neBARCOUNT musiyano. Server date, nguva, kukosha kweINSTRUMENT uye BARCOUNT zvinosiyana zvinoshumwa neSET_VALUE () basa muOUTPUT. Mutsara uyu wakagadzirwa neCREATE_MAP() murairo. Iyo data inowira mune yakasarudzika tafura, iyo inogona kuoneka mumufananidzo pazasi. kukosha kweINSTRUMENT uye BARCOUNT zvinosiyana zvinoshumwa neSET_VALUE () basa muOUTPUT. Mutsara uyu wakagadzirwa neCREATE_MAP() murairo. Iyo data inowira mune yakasarudzika tafura, iyo inogona kuoneka mumufananidzo pazasi. kukosha kweINSTRUMENT uye BARCOUNT zvinosiyana zvinoshumwa neSET_VALUE () basa muOUTPUT. Mutsara uyu wakagadzirwa neCREATE_MAP() murairo. Iyo data inowira mune yakasarudzika tafura, iyo inogona kuoneka mumufananidzo pazasi.
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIK

Kutengesa marobhoti paQPILE – yakagadzirira-yakagadzirwa mhinduro

Kufamba avhareji robhoti

Demo robhoti haina kukodzera kutengeserana chaiko.
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIKIyo robhoti inosanganisira 5 parameters. ZUVA, NGUVA, PRICE identifier values ​​akaiswa padanho 30. KUFAMBA uye TP zviziviso zvakaiswa kune zero chaiyo. Robhoti kodhi paavhareji inofamba yakanyorwa pasi peQPILE: [galari mbiru = “5” ids = “14896,14897,14898,14899,14900,14901,14902,14903,14904,14905,14906,14907”

N. Moroshkin chinzvimbo karukureta

Chirongwa chekuverenga mazinga eiyo yakanyanya kubvumidzwa kudhirowa uye chinangwa chenzvimbo refu uye pfupi pazvino kubvunza uye kubhidha mitengo. Iwo mazinga akaverengerwa 2 kukosha kweiyo chinzvimbo chekupinda vhoriyamu. Iyo robhoti inowana iyo inobvumirwa chinzvimbo vhoriyamu kana ichipa yekumisa odha mune imwe nhanho kubva pamutengo wekuvhura nekuverenga kwekuvhura chinzvimbo munzira yekukura kwebhawa. Iwo akawanikwa mazinga anopinzwa muhwindo rekupedzisira, iro rinozoratidzwa mumutengo chati. Transactions inogadziriswa kune yakapihwa chiridzwa. Kana nzvimbo yakavhurwa, robhoti inotanga kuverenga maparameter ayo. Zvichienderana nekuchinja kwechinzvimbo, mirairo yakapihwa inogadziriswa.
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIK
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIK

Vhoriyamu sefa

Portfolio robhoti rekuverenga masvomhu anoreva huwandu hwemakenduru uye kuenzanisa neavhareji yechigadzirwa necoefficient X. Inoshanda nemazvo nemachati akarongwa munguva yakasarudzwa.
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIK

Options vaGiriki

Portfolio yekuverenga uye kuratidza “Greek” yesarudzo. Iyo inosiyana neiyo nzira yeBlack-Showers.
Mutauro wealgorithmic QPILE wekugadzira marobhoti ekutengesa eQUIK

TRIX yekutengesa robhoti yeQUIK

Chirongwa ichi chakavakirwa paTRIX Indicator. Kana iyo chiratidzo ichivhara pamusoro pemutsara we zero, iyo yakatarwa nhanho, iro robhoti inotora iyo Yakareba chinzvimbo. Nzvimbo yacho yakavharwa neTora Profit, Stop Loss kana trailing stop.

M4 Preprocessor

Chirongwa chekushanda neQPILE uye Lua. Inosanganisira zvakachengetwa zvine mafaera anogona kuitiswa, zvinyorwa uye DLL mafaera ane anogaro kutaura parsing. Kuti ushandise chirongwa, unofanirwa kuburitsa mafaera anogona kuitiswa uye woisa regexp2 muC:\Windows nzira. Zvidzidzo zveQPILE zveQUIK: https://youtu.be/vMTXwDUujpI Kuisa chinyorwa paQPILE muQuik terminal: https://youtu.be/0B7qL8Svh7I Chikamu chegithub chinotsanangura kushandiswa kwemutauro weQPILE algorithmic wakavakirwa mukati QUIK system workstation iri pane chinongedzo – https://euvgub.github.io/quik_user_manual/ch8.html. QPILE mutauro wechinyakare, asi uri nyore uye unowanikwa kunyangwe kune vatengesi vekutanga. Kutengeserana marobhoti uye zvirongwa zvakaratidza ivo pachavo kwenguva yakareba zvinoramba zvichishanda pazviri. Nekudaro, kune mamwe mabasa akaomarara zviri nani kushandisa LUA.

info
Rate author
Add a comment

  1. Владимир Геннадьевич Евсеев

    Reply