{"id":1564,"date":"2021-11-05T20:47:53","date_gmt":"2021-11-05T11:47:53","guid":{"rendered":"https:\/\/astcconline.com\/?p=1564"},"modified":"2022-06-03T20:49:44","modified_gmt":"2022-06-03T11:49:44","slug":"en-ea-ma-ma","status":"publish","type":"post","link":"https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/1564\/en-ea-ma-ma\/","title":{"rendered":"NO.3  EA for MT5 using MA and MA (Moving Average) FX Automatic trading"},"content":{"rendered":"<h3>basic specifications<\/h3>\n<p>After the time axis is fixed, the judgment is made based on the two moving averages.<\/p>\n<p>If LONG exceeds SHORT, buy<br \/>\nIf LONG falls below SHORT, sell.<\/p>\n<p>If you have a position,<br \/>\nIf the index reverses<br \/>\nAfter closing the position<br \/>\nAcquired the opposite position.<\/p>\n<h3>Input value setting (variable name, initial value, explanation)<\/h3>\n<p>\/\/Moving average setting short term<br \/>\nT_period_s           = PERIOD_CURRENT;       \/\/Short Calculation target<br \/>\nMA_period_s          = 10;                   \/\/Short Calculation period<br \/>\nMA_shift_s           = 0;                    \/\/Short shift<br \/>\nMA_method_s          = MODE_SMA;             \/\/Short smoothing<br \/>\nMA_applied_s         = PRICE_CLOSE;          \/\/Short Price type<\/p>\n<p>\/\/Moving average setting long term<br \/>\nT_period_L           = PERIOD_CURRENT;       \/\/Long Calculation target<br \/>\nMA_period_L          = 10;                   \/\/Long Calculation period<br \/>\nMA_shift_L           = 0;                    \/\/Long shift<br \/>\nMA_method_L          = MODE_SMA;             \/\/Long smoothing<br \/>\nMA_applied_L         = PRICE_CLOSE;          \/\/Long Price type<\/p>\n<p>\/\/Profit ant Stop loss setting<br \/>\n\/\/When ordering<br \/>\nTP_Bairitu = 0; \/\/Profit when ordering : 0 = Not set, Other than= Rate from current price >> Example: 0.005<br \/>\nSL_Bairitu = 0; \/\/Profit when ordering : 0 = Not set, Other than= Rate from current price >> Example: 0.005<br \/>\n\/\/At the time of tick<br \/>\nTP_kin = 100; \/\/tick time Profit : 0 = not set, Other than = Fixed value >> Example: 100<br \/>\nSL_kin = -100; \/\/tick time Stop loss : 0 = not set, Other than = Fixed value >> Example: -100(Negative value)<\/p>\n<p>\/\/lot and magic number<br \/>\ninput double Fix_Lot = 0.01; \/\/Order lot<br \/>\ninput ulong MagicNumberA = 123456789; \/\/magic number<br \/>\ninput bool log_out = 0; \/\/output the log<br \/>\ninput bool DamiDami = 0; \/\/Dummy setting for optimizing invalidity<\/p>\n<h3>supplementary explanation<\/h3>\n<p>TP_Bairitu and SL_Bairitu are set when the position is acquired.<br \/>\nIf it is 0, there is none.<br \/>\nIf 0.01, the current price is<br \/>\nIf it is 100 yen, the profit will be 101 (100 + 100 * 0.01).<br \/>\nThe stop loss is 99 (100-100 * 0.01).<\/p>\n<p>Enter fixed values \u200b\u200bfor TP_kin and SL_kin. Judgment is made for each Tick.<br \/>\nIf you enter TP_kin as 1000, it will be settled when the profit and loss becomes 1000 or more.<br \/>\nIf you enter -100 in SL_kin, the profit and loss will be settled when it exceeds -100.<br \/>\nEnter a negative value for SL_kin.<\/p>\n<p>Download this EA.<\/p>\n<p><a href=\"http:\/\/kerotto.mydns.jp\/wp-content\/custom_php\/download_counter.php?dlc_folder=\/EA\/&#038;dlc_name=iMA2_20211006.mq5\">iMA2_20211006.mq5<\/a><\/p>\n<p><a href=\"http:\/\/kerotto.mydns.jp\/wp-content\/custom_php\/download_counter.php?dlc_folder=\/EA\/&#038;dlc_name=iMA2_20211006.ex5\">iMA2_20211006.ex5<\/a><\/p>\n<h3>Back test<\/h3>\n<p>USDJPY<br \/>\nTime value  = H1<br \/>\nInput value = initial value<br \/>\nPeriod      = last year<\/p>\n<p><a href=\"http:\/\/kerotto.mydns.jp\/wp-content\/uploads\/2021\/10\/4a42a7625e0623bd358734e230490f80.png\"><img  title=\"\" loading=\"lazy\" decoding=\"async\" src=\"http:\/\/kerotto.mydns.jp\/wp-content\/uploads\/2021\/10\/4a42a7625e0623bd358734e230490f80.png\"  alt=\"4a42a7625e0623bd358734e230490f80 NO.3  EA for MT5 using MA and MA (Moving Average) FX Automatic trading\"  width=\"1591\" height=\"604\" class=\"alignnone size-full wp-image-96\" srcset=\"https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-content\/uploads\/2021\/10\/4a42a7625e0623bd358734e230490f80.png 1591w, https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-content\/uploads\/2021\/10\/4a42a7625e0623bd358734e230490f80-300x114.png 300w, https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-content\/uploads\/2021\/10\/4a42a7625e0623bd358734e230490f80-1024x389.png 1024w, https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-content\/uploads\/2021\/10\/4a42a7625e0623bd358734e230490f80-768x292.png 768w, https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-content\/uploads\/2021\/10\/4a42a7625e0623bd358734e230490f80-1536x583.png 1536w\" sizes=\"auto, (max-width: 1591px) 100vw, 1591px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/kerotto.mydns.jp\/wp-content\/uploads\/2021\/10\/03426cbaf6d146e308240fc31de17b4e.png\"><img  title=\"\" loading=\"lazy\" decoding=\"async\" src=\"http:\/\/kerotto.mydns.jp\/wp-content\/uploads\/2021\/10\/03426cbaf6d146e308240fc31de17b4e.png\"  alt=\"03426cbaf6d146e308240fc31de17b4e NO.3  EA for MT5 using MA and MA (Moving Average) FX Automatic trading\"  width=\"1595\" height=\"611\" class=\"alignnone size-full wp-image-95\" srcset=\"https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-content\/uploads\/2021\/10\/03426cbaf6d146e308240fc31de17b4e.png 1595w, https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-content\/uploads\/2021\/10\/03426cbaf6d146e308240fc31de17b4e-300x115.png 300w, https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-content\/uploads\/2021\/10\/03426cbaf6d146e308240fc31de17b4e-1024x392.png 1024w, https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-content\/uploads\/2021\/10\/03426cbaf6d146e308240fc31de17b4e-768x294.png 768w, https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-content\/uploads\/2021\/10\/03426cbaf6d146e308240fc31de17b4e-1536x588.png 1536w\" sizes=\"auto, (max-width: 1595px) 100vw, 1595px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>basic specifications After the time axis is fixed, the judgment is made based on the two moving averages. If L [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-1564","post","type-post","status-publish","format-standard","hentry","category-english-page-ea"],"_links":{"self":[{"href":"https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-json\/wp\/v2\/posts\/1564","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-json\/wp\/v2\/comments?post=1564"}],"version-history":[{"count":1,"href":"https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-json\/wp\/v2\/posts\/1564\/revisions"}],"predecessor-version":[{"id":2686,"href":"https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-json\/wp\/v2\/posts\/1564\/revisions\/2686"}],"wp:attachment":[{"href":"https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-json\/wp\/v2\/media?parent=1564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-json\/wp\/v2\/categories?post=1564"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kerotto.mydns.jp\/kerotto_mydns_jp\/wp-json\/wp\/v2\/tags?post=1564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}