本稿では、私が個人的に好むヘッジペアを選択します。それは EURJPY と GBPJPY
です。それはつねに同じように変動し、ヘッジングオーダータイプの設定が簡単なものです。それでは始めましょう。ヘッジ EA
の作成を始めるにあたり、以下の入力変数について学習します。
// this is to block the order sending function but // not to block the close function.externbool BlockOpening = false;
externstring BaseSymbol = "EURJPY";//the 1st symbol externstring H_Symbol = "GBPJPY";//the 2nd symbol externbool MoveSameWay = true;//they move the same way or not externint CorPeriod = 5;//your favorite correlation period externdouble BaseLotSize = 1.5;//1st symbol lotsize externdouble H_LotsSize = 1.0;//2nd symbol lotsize externdouble ExpectProfit$ = 137;//your expect profit in USD //your acceptable loss in USD in case any error occurred externdouble AcceptableLoss$ = -77;
externstring ExpectCor = "______";//your expect correlation to hedge //this is the upper expect cor value and has to be greater than "And" externdouble Between = 1.05;
externdouble And = 0.9;//this is the lower expect cor level externstring MISC = "______";//some thing more externint MagicNo = 318;//your favorite magic number externbool ShowStatus = true;//to show the present hedging status //to play sound when SendH and CloseH function done externbool PlayAudio = false;
新しい記事 ヘッジ Expert Advisor コーディングの基礎 はパブリッシュされました:
ステップ1:入力パラメータ
ヘッジ EA を書き始める前にまず相関シンボルを2つ選ぶ必要があります。それが以下です。
本稿では、私が個人的に好むヘッジペアを選択します。それは EURJPY と GBPJPY です。それはつねに同じように変動し、ヘッジングオーダータイプの設定が簡単なものです。それでは始めましょう。ヘッジ EA の作成を始めるにあたり、以下の入力変数について学習します。
作者: chayutra sriboonruang