Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIK

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

Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIK.
Imashini za robo zirashobora kwandikwa mururimi runaka, rusa na code ya progaramu. QPILE nimwe murimwe, ingingo izasuzuma uru rurimi, igereranya indimi za QPILE na
LUA , kandi itange n’ingero za robo mururwo rurimi.

Amakuru rusange yerekeye QPILE

QPILE ni impfunyapfunyo isobanura QUIK Programmable Interface hamwe nibidukikije byumvikana.

Uru ni urukurikirane rw’amategeko yasobanuwe na QUIK ikoreramo. Ikoreshwa cyane mukubara igiciro cyinshingano zagaciro. Ururimi narwo rukoreshwa kuri:

  • imbaraga zo kongera kubara igiciro cyumutungo wabakiriya kuri desktop ya broker no mubikorwa byabo. Mugihe cyanyuma, igiciro cyabo cyose nacyo cyongeye kubarwa;
  • gushakisha ibipimo byabuze ukoresheje algorithms zabo hamwe namakuru yo kuguriza margin;
  • guteza imbere ingamba nziza z’ubucuruzi.

Ururimi rusobanura imiterere yimbonerahamwe: ishyirwaho ryinkingi nimirongo, formula. Mugihe cyanyuma, ibikorwa byimibare, impinduka, amakuru kuva kumeza yandi arashobora gukoreshwa mukubara. Porogaramu code yapakiwe muri seriveri ya QUIK cyangwa kuri disiki yumukoresha itunganywa numusemuzi wururimi, ubara indangagaciro muri formula. Imbonerahamwe ya porogaramu imwe ifite isoko imwe yamakuru, ariko kubara ntabwo byigana kandi ntabwo bigira ingaruka kumikorere ya sisitemu. Iyo ukorana nameza ya QUIK, imbonerahamwe kuri QPILE ifite imikorere isanzwe. QUIK mu kazi ifite ibikoresho bya QPILE. https: Umukoresha azakira imenyesha muburyo bwikimenyetso cyamajwi cyangwa ubutumwa bwanditse. Imbonerahamwe kuri QPILE irashobora guhindurwa, gucapwa, gukoporora, koherezwa hakoreshejwe ODBC na seriveri ya DDE. Amakuru yambere yaturutse kumeza QUIK:

  • ibikorwa, harimo no kubishyira mu bikorwa no kutagira umuntu;
  • gutumiza, harimo guhagarika ibicuruzwa, kubucuruzi burenze ibicuruzwa no gutumiza – raporo kubucuruzi mumasezerano yo kwishura;
  • “umukiriya portfolio”, “kugura / kugurisha”
  • amakuru ava mumyitozo yabitabiriye kumafaranga, konti zubucuruzi, igikoresho.

Imbonerahamwe ishingiye kuri QPILE ntishobora gukopororwa muri dosiye yinyandiko ikoresheje menu ibivugwamo no koherezwa muri sisitemu yo gusesengura tekinike, kandi imbonerahamwe ntishobora gutezwa imbere ishingiye kuri zo. Imbonerahamwe ishingiye kuri QPILE ntishobora kuyungurura cyangwa gutondekanya.

Gukorana nameza

Kugirango ushireho kode ya porogaramu, ugomba guhitamo serivise ya menu, hanyuma QPILE inyandiko. Urashobora kandi gukoresha ikomatanya Ctrl + F11. Nyuma yo gukanda “Ongera” hanyuma uhitemo dosiye wifuza. Ifite umugereka wa .qpl kandi izina ryayo rizagaragara kurutonde rwaboneka.
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIKNiba hari ikosa muri gahunda, sisitemu izakora imenyesha muri “Ubutumwa Idirishya”, rizaba ririmo izina rya dosiye ifite inenge numero yumurongo hamwe nikosa. Niba nta kunanirwa kwabonetse muri dosiye, amakuru akurikira azerekanwa mumirima:

  • izina ry’imbonerahamwe;
  • umubare winkingi nabakiriya;
  • urutonde rw’ibiranga n’abakiriya;
  • urutonde rwibipimo ninkomoko yinkomoko ya dosiye.

Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIKAkabuto “Gukuramo hano” bizagufasha kubona imbonerahamwe muri dosiye, kandi “Kuramo kuri seriveri” izohereza porogaramu kuri seriveri kugirango abakoresha bose babashe kuyigeraho. Kurema imbonerahamwe, kanda Kurema Imbonerahamwe. Muri “Inyandiko ziboneka” hitamo porogaramu ukeneye gukora, shyira umubare wumurongo ukoresheje “Akayunguruzo k’abakiriya”, menya inkingi zisabwa hamwe nuburyo bikurikirana.
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIKKuruhuka no gukomeza kubara, gutangira kubara nanone no muburyo bwo gukemura, kubika ibisobanuro kuri dosiye, kwerekana formulaire, hamwe nibisobanuro byanditse birahari murutonde rwibikubiyemo.

QPILE yubaka

Ubwoko bwamakuru

  • Ikurikiranyanyuguti – umugozi.
  • Kabiri ni nimero ireremba.
  • Icyegeranyo – icyegeranyo.
  • Ikarita – ihuriro ryibisobanuro – urukurikirane rwibintu bibiri bigufasha kubona amakuru kurufunguzo.

Imvugo

Imibare yimibare yinyongera, gukuramo, kugwiza, kugabana birakoreshwa. Imvugo yumvikana “na”, “cyangwa”, iringaniye, byinshi, bike, ubusumbane, kubaka ibintu “niba … noneho …” nabyo birakoreshwa.

Imikorere

Imikorere irashobora kuba ahantu hose muri gahunda kandi ifite amazina atandukanye. Muri rusange, amatsinda 18 yimibare yimikorere nimirimo irahari kugirango tubone indangagaciro zimbonerahamwe nibipimo, guhuza imirongo, urutonde rwimbonerahamwe, nibindi bikorwa. Icyiciro cya mbere:

  1. Imibare yimibare igufasha gusubiza agaciro ka sine, cosine, tangent, cotangent yimpaka, kubara ibyerekana impaka, kubyara umubare utemewe, nibindi.
  2. Amategeko rusange : NEW_GLOBAL gutangiza impinduka zisi yose hamwe nubutumwa bwo gufungura ubutumwa.

Imikorere yo gukorana na:

  • Gukusanya ibintu (Icyegeranyo) . Bakwemerera gukora icyegeranyo gishya, gusubiza umubare ukenewe wibintu, gusimbuza cyangwa gushyiramo indangagaciro.
  • Amashanyarazi (MAP) . Gufasha kurema no gucunga umurongo.
  • Amadosiye – gukorana namadosiye yinyandiko, kubungabunga log-log ya porogaramu. Izina rya dosiye rishobora kuba rikubiyemo inzira igana.
  • Imirongo .
  • Igishushanyo . Imikorere GET_CANDLE kugirango ubone amakuru ya buji na GET_CANDLE EX kugirango usubize umurongo uhuza.
  • Porogaramu . Gukora ibicuruzwa no kubyohereza muri sisitemu yubucuruzi.
  • Etiquetas . Kubaka no kwishyiriraho imbonerahamwe. Ongeraho, gusiba kimwe cyangwa ibirango byose, kubona no gushiraho ibipimo bya label runaka.

Hariho kandi imikorere ya:

  1. Kugirango ugere kumurongo wimbonerahamwe ya QUIK utabishaka nurutonde rwibipimo bihari . Kugera kumeza yakazi kumeza. Harimo GET_ITEM gusubiza MAP na GET_NUMBER_OF gusubiza umubare wibyanditswe.
  2. Gukorana nimbonerahamwe ishobora gutegurwa . Aya mategeko akorera kumeza ya OWN. Irasomwa nimirimo isanzwe kuva mu gika kibanziriza iyi niyi mirimo. Iri tsinda ririmo amategeko yo kongeramo, guhindura no gusiba umurongo hamwe nurutonde, no gukuraho burundu imbonerahamwe ya OWN.

Kubona indangagaciro zikoreshwa:

  1. Imbonerahamwe yubucuruzi bugezweho . Kubona amakuru yo guhanahana amakuru ukoresheje GET_PARAM (_EX).
  2. Vuga Windows . Kubona indangagaciro zamagambo yatanzwe.
  3. Imbonerahamwe yimyanya ukoresheje ibikoresho n’amafaranga . Kubona amakuru kumukiriya, isosiyete, igikoresho, konte ya depo ukoresheje kode.

Imikorere ya serivisi – gusubiza itariki yubucuruzi bwubu, urukurikirane rwibihe, itariki nigihe, kugena imiterere ihuza, guhagarika uburyo bwo kubara.

Gukemura gahunda

Intambwe ku yindi kugenzura imikorere ya porogaramu ikorerwa mu idirishya “Gukemura”. Ifunguye uhereye kuri menu “Tangira kubara muburyo bwo gukemura”. Irashobora kandi gufungurwa hamwe na break point () itegeko, kandi umurongo wa gahunda uzamurikwa mumutuku. Idirishya ririmo imirima hamwe na code ya progaramu nindangagaciro. Hepfo yidirishya hari buto “Intambwe ikurikira”, “Komeza gukora”, “Hagarika kubara”. Kanda F5 bizakomeza ishyirwa mubikorwa rya porogaramu, guhuza Shift + F5 bizahagarika gukemura, urufunguzo rwa F10 ruzajya kumurongo ukurikira.

QPILE cyangwa LUA?

LUA ni ururimi rushya rwo gutangiza porogaramu zo gukora robot. Kimwe na QPILE, bishyirwa mubikorwa muri QUIK. https://articles.opexflow.com/programming/lua.htm Urubuga rwahariwe iterambere ryimashini zubucuruzi zubucuruzi zerekana ibyiza byururimi rwa LUA kurenza QPILE. Rero, irashobora gukora nkimyandikire idakusanyirijwe hamwe na bytecode, ifite ibikoresho byabatezimbere hamwe nuburyo bwo gutangiza porogaramu. Ibintu byanditse mu zindi ndimi za porogaramu birashobora guhuzwa na gahunda ya LUA. LUA itanga ubwoko 8 bwamakuru, harimo metatable. Ururimi rwa LUA ni urudodo rwinshi, rwihuta, hamwe nubucuruzi nibintu byanyuma ntibisanzwe. LUA irasanzwe kuruta QPILE, kandi iyagurwa ryinshi yarayanditse.

Ururimi rwa QPILE ubu rwataye agaciro. Impuguke kuri forumu zirasaba gukoresha LUA. Nubwo gahunda zingirakamaro kandi zingirakamaro ziracyakoreshwa.

Nyamara, ururimi rwa QPILE rworoshye ugereranije na LUA, niba rero udafite uburambe muri programming, nibyiza guhitamo QPILE. Muri uru rurimi, urashobora kwandika robot yoroshye niba udakeneye gukora imibare igoye.

Nigute ushobora gukora robot yubucuruzi kuri QPILE?

Kurema umujyanama wubucuruzi, uzakenera gahunda zikurikira:

  1. ITS Quik.
  2. Notepad ++ umwanditsi mukuru.
  3. Ubuyobozi kuri QPILE.
  4. XML plugin yo kumenya kode muri Notepad ++.

Kuramo kandi ushyireho porogaramu. Gushoboza ururimi ururimi ushyira umukoreshaDefineLang.xml munzira C: \ Abakoresha \ Umukoresha \ AppData \ Roaming \ Notepad ++ \
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIKIcyambere, reka dushyireho ingamba zikurikira zubucuruzi. Inyandiko igomba kubara Muraho na Hasi kuri buji ya nyuma buri munota, reba igiciro cyibikoresho. Umwanya wafunguwe mu cyerekezo gisabwa niba igiciro cyigikoresho kigeze ku giciro kinini cyangwa gito cyigihe. Iyo ikimenyetso kigufi cyakiriwe, umwanya muremure uhita ufungwa. Imashini ikoresha igikoresho cya GAZP, igihe cyagenwe kugeza 1 min. Ubujyakuzimu bwa hi-buke bwashyizwe kuri buji 5. Kwinjira Birebire, hashyizweho itegeko hamwe no guhuza igiciro kiriho agaciro ntarengwa mugihe. Robo izinjira mugufi niba igiciro kiriho kirenze agaciro ntarengwa kuri buji 5. Andika agace kode muri Notepad ++ hamwe nigenamiterere ryibanze hamwe na seriveri itariki nigihe. Iyi code irerekanwa mwishusho hepfo.
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIKImirongo 4 yambere ya code ikora umutwe wumutwe. Hagati yumurongo wa 6 na 44 numubiri wa gahunda, ikubiyemo ibiri muri robo. Imirongo 7 – 12 ikubiyemo igenamigambi ryabakoresha, ririmo kode yigikoresho, itsinda hamwe nabakiriya, nimero ya konte kuri MICEX. Indangagaciro ntizihinduka mugihe cyo gukora gahunda. Imirongo 13 – 16 nigiciro cyambere cyibihinduka. Bazasubizwa kuri zeru kuri buri iterisiyo. Imirongo 17 – 21 ikubiyemo icyerekezo cyo gukoresha seriveri nigihe. Aya makuru yatanzwe mumikorere ya DATETIME hanyuma ahindurwa muburyo bw’inyandiko. Imirongo 22 – 29 ohereza amakuru yakiriwe kumeza. Kode igomba gukizwa kandi kwagura qpl bigomba gutomorwa.
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIKFungura porogaramu muri QUIK ukanda Ctrl + F10 hanyuma uhitemo dosiye yakozwe qpl. Koresha Ctrl + F11 kugirango ufungure idirishya “Korana na Portfolios” hanyuma ushireho igihe cyo kubara portfolio kugeza kuminota 5. Kanda Ctrl + F12 kugirango ushireho inkingi zo kwerekana mumeza. Ishusho yerekana ibisubizo byakazi ka robo.
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIKReka twongere imirimo mike hamwe nibisabwa muri gahunda yacu.
Guhagarika “Umukoresha igenamigambi” byongeweho hamwe na NUMBER na INTERVAL impinduka, zizakoreshwa mumikorere yo kubona utubari twa nyuma N. Imikorere ya DATETIME ishyiraho seriveri itariki nisaha, hamwe nitariki nigihe cyakazi CURDATE na CURTIME byitwa kuva. Igihe cyubu gihindurwa kumubare kumurongo 24. Umurongo wa 26 ushyiraho igihe algorithm yo gukora kuva 10:00:01 kugeza 18:40:00 UTC.
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIK
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIK
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIKUrurimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIKKenshi na kenshi, ibipimo, oscillator, kubara imibare bibarwa na buji ya nyuma ya N ya mbonerahamwe. QPILE ntabwo ifite umurimo wo gukusanya umubare wa buji N ibihe byashize nkibyo, ariko hariho imikorere ya GET_CANDLE igera kuri buji ku mbonerahamwe nitariki nigihe muburyo bw’inyandiko. Kode yacu ikubiyemo imikorere yo kubona N bar ya nyuma OHLC (). Irema icyegeranyo hamwe nibipimo bya buji yanyuma yashizwe kurutonde rwa COLLECTION. Porogaramu igenzura agaciro ka INTERVAL, kandi niba itaguye mu ntera 0… 60, ubutumwa bwerekanwe ko agaciro kadahuye nurwego rwemewe. Icyegeranyo cya MAP gifite buji cyakozwe kumurongo wa 88. A FOR loop itora imbonerahamwe kugeza ubujyakuzimu bukenewe hamwe nintambwe INTERVAL kuva kuri shyashya kugeza kuri buji ishaje. Ku murongo wa 90, nyuma yizunguruka rimaze gutangazwa, robot isubira inyuma. Iyo ubonye buji hamwe na GET_CANDLE, shyira mu cyegeranyo cya BARLIST ukoresheje imikorere ya INSERT_COLLECTION_TEAM. Nkigisubizo cyibikorwa bya OHLC () itegeko, BARLIST yujujwe na buji ya nyuma uhereye ku mbonerahamwe y’ibikoresho mu mubare wa NUMBER. Umubare wibintu biri mu cyegeranyo urasabwa na GET_COLLECTION_COUNT () kandi bigatangazwa na variable ya BARCOUNT. Itariki ya seriveri, igihe, indangagaciro za INSTRUMENT na BARCOUNT zahinduwe zikorwa na SET_VALUE () imikorere muri OUTPUT. Iyi ntera yakozwe na CREATE_MAP () itegeko. Amakuru ari mumeza yihariye, ushobora kugaragara kumafoto hepfo. indangagaciro za INSTRUMENT na BARCOUNT zahinduwe zitangazwa numurimo wa SET_VALUE () muri OUTPUT. Iyi ntera yakozwe na CREATE_MAP () itegeko. Amakuru ari mumeza yihariye, ushobora kugaragara kumafoto hepfo. indangagaciro za INSTRUMENT na BARCOUNT zahinduwe zitangazwa numurimo wa SET_VALUE () muri OUTPUT. Iyi ntera yakozwe na CREATE_MAP () itegeko. Amakuru ari mumeza yihariye, ushobora kugaragara kumafoto hepfo.
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIK

Gucuruza robot kuri QPILE – ibisubizo byiteguye

Kwimura robot igereranije

Imashini ya Demo idakwiriye gucuruzwa nyabyo.
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIKImashini ikubiyemo ibipimo 5. ITARIKI, IGIHE, Ibiciro biranga ibiciro byashyizwe kurwego 30. KIMUKA na TP biranga TP byashyizwe kuri zeru neza. Kode ya robo ku kigereranyo cyimuka yanditse munsi ya QPILE:

N. Kubara umwanya wa Moroshkin

Porogaramu yo kubara urwego rwo hejuru rushobora kwemerwa gukururwa hamwe nintego kumwanya muremure kandi mugufi kuri ubu ubaze nibiciro byamasoko. Inzego zibarwa kubiciro 2 byumwanya winjiza. Imashini isanga ingano yimyanya yemewe mugihe igenera gahunda yo guhagarika intambwe imwe uhereye kubiciro byo gufungura hamwe no kubara gufungura umwanya mubyerekezo byo gukura kwakabari. Inzego zabonetse zinjiye mumadirishya yanyuma, bigaragarira mubishushanyo mbonera. Ibicuruzwa byagenwe kubikoresho runaka. Niba umwanya wafunguwe, robot itangira kubara ibipimo byayo. Ukurikije impinduka mumwanya, amabwiriza yatanzwe arahindurwa.
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIK
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIK

Akayunguruzo

Imashini ya Portfolio yo kubara imibare yimibare yubunini bwa buji no kuyigereranya nigicuruzwa cyagereranijwe na coefficient X. Ikora neza hamwe nimbonerahamwe yateguwe mugihe cyatoranijwe.
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIK

Amahitamo Abagereki

Portfolio yo kubara no kwerekana “Abagereki” amahitamo. Itandukanye nuburyo bwa Black-Showers.
Ururimi rwa Algorithmic QPILE ya progaramu yo gucuruza robot ya QUIK

Imashini ya TRIX yubucuruzi kuri QUIK

Porogaramu ishingiye ku cyerekezo cya TRIX. Iyo icyerekezo gifunze hejuru yumurongo wa zeru, urwego rwerekanwe, robot ifata umwanya muremure. Umwanya ufunzwe na Fata Inyungu, Hagarika Igihombo cyangwa guhagarara.

M4

Gahunda yo gukorana na QPILE na Lua. Harimo ububiko hamwe namadosiye akorwa, inyandiko na dosiye ya DLL hamwe nibisanzwe byerekana. Kugira ngo ukoreshe porogaramu, ugomba gupakurura dosiye zikorwa hanyuma ugashyira regexp2 munzira ya C: \ Windows. Amasomo kuri QPILE ya QUIK: https://youtu.be/vMTXwDUujpI Gushyira inyandiko kuri QPILE muri Quik terminal: https://youtu.be/0B7qL8Svh7I Igice kuri github gisobanura imikoreshereze yururimi rwa QPILE rwubatswe muri. Sisitemu ya QUIK ikorera kumurongo – https://euvgub.github.io/quik_user_manual/ch8.html. QPILE ni ururimi rushaje, ariko rworoshye kandi rushobora kugera no kubacuruzi bashya. Gucuruza ama robo na gahunda byagaragaye ko bimaze igihe kinini bikomeza kubikoraho. Ariko, kubikorwa byinshi bigoye nibyiza gukoresha LUA.

info
Rate author
Add a comment

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

    Reply