アルゴリズムと機械の外国為替戦略 | OneStepRemoved

  • Articles
  • Sophisticated Web Sites
  • Automated Trading
  • お客様の声
  • お問い合わせ

高周波 NinjaTrader 戦略

1 月 30, 2012 によって ショーンオバートン 7 コメント

長期的にクライアントの代わりに NinjaTrader の高頻度取引システムに作業されてきた. MB の取引は、私のライブ口座です。. 成行注文を配置し、手数料を支払うのではなく, 私は変更する注文の種類 指値注文. ための小委員会を受けたい、 市場戦略 表示されている価格を受け入れるように手数料を支払うのではなく.

メタト レーダー NinjaTrader 高頻度取引のための優れたオプションを作る 2 つの主要な欠点に苦しむ. MT4は、M1の時間枠と比べて低いのチャートを提供していません トレード状況がビジー状態エラーです。 複数のグラフが同時に実行するを防ぎます. NinjaTrader はほとんどの詳細を制御することができます私に十分な複雑です, しかし、シンプルな何百ものアイデアをテストする時間を投資する必要はないこと. 広く価格係として M1 チャート戦略をテストの後, 非常に確信している戦略が健全であること. 唯一の問題今決定することだかどうか、パッシブを取って (すなわち, 市場作り) アプローチ戦略を価値があるようにする十分な塗りになります.

NinjaTrader と出会った最初の問題ではなかった; それは MB の取引の API とあった. 戦略シミュレーションのアカウントでうまく働いた, 注文を NinjaTrader をルートのみ (NT). NT は、塗りが発生したとき、推測を作る. その段階の目標は、戦略をテストすることでした。. それが正しく働いているかどうかを確認するプログラミングをテストしたかっただけ.

100 Sim アカウントで滞りなく取引が消えた. だけそれを作った戦略 2-3 ライブ口座でマイクロロット取引を保留中の注文がハングする前に. 保留中の注文 NinjaTrader を通過します。 3 実際に市場に出回る前に、の状態. そこのプログラマ, これらは、ダイアモンドライク オブジェクトの OrderState プロパティ.

  1. 保留中の送信 – 戦略は、ブローカーに注文を送信し、聞くを待ってバック
  2. 受け入れ – 注文の領収書ブローカー, まだ市場に注文をするが、
  3. 作業 – 順序は貿易に他のご利用

刻むごとに更新戦略受注. ペースがあまりにもすぐに行くことが頻繁に起こった, 高速市場の中に大手通信バックログの作成. NinjaTrader 例外を投げたことはないです。. 問題の唯一の証拠だったとして、PendingChange プロパティとぶら下げ順序を見られる. 不便なソリューションは、NinjaTrader を終了し、すべてを再読み込み.

私が考え出したおそらくマネージ注文の状態が問題を引き起こした. アンマネージの注文に私のアプローチを変更, それは違いをしていないが、. 最終的には MB のトレーディング API が数秒以上 1 つの注文を処理できないことが実現に来た.

2 番目のグラフに目盛りから変更後のスイート スポットを発見する戦略. 更新 6 秒またはもはや高周波アプローチのようなものを維持したまま wihle を更新する MB トレーディング API の十分な時間を与えるように見える. MB の取引 FIX プロトコルを使用する必要があります、しきい値よりも高速に実行する必要のあるすべての取引.

狂気私を運転した、その他の要素は、指値注文は自動的に 1 回自分自身を削除、NinjaTrader バー. 私は近い私の髪を引き裂いた, そんな髪を持っていないと, いくつかの時間なぜ注文は自動的に自分自身を削除を把握しよう. 堅いノックの学校学習方法で多くの人々 を識別します。. 厚さとして向かってるほとんどが. 原因を考え出したとき私 revisitied NinjaTrader オンライン ドキュメントの取消すまで有効ことができます制限エントリ方法を発見 (GTC) 注文.

明らかにまた速度の問題がはみ出すほど. 消費し過ぎる、戦略は、保留中の注文をキャンセルする要求する場合, ブローカーは、キャンセルが効く前に順序を塗りつぶします. 最大の懸念をはみ出すほど NinjaTrader が自動的に戦略を無効にし、消費し過ぎるが発生したときに、市場でのポジションを終了するには. エントリ メソッドをアンマネージ アプローチに変更するプログラムを使用してこの問題を回避する唯一の方法は.

NinjaTrader で高周波の戦略を開発する最も簡単な方法 (ない超高周波が、) 管理命令を使用することです。. 出口が必要なとき, 反対の方向で制限エントリを配置します。. NinjaTrader 公開市場給の出口、発注の世話します。. 秒のすべての一握りに更新を制限します。. それはブローカー API に追いつくことができます、問題を回避できますをはみ出すほど.

以下の下でファイルさ: NinjaTrader ヒント, 戦略の取引のアイデア, 未分類 タグが付いて: API, GTC, 高周波, ダイアモンドライク, 制限, MB の取引, メタト レーダー, mt4, ninjatrader, OrderState, いっぱいになります。, 戦略, ティック, トレード状況がビジー状態

効率のバックテスト

12 月 9, 2011 によって ショーンオバートン 6 コメント

あなたは戦略の統計データのエントリ効率と出口効率をテストしていない場合はあなたの外国為替backtestsは絶対に価値がないです. 必然的にバックテストを実行している誰もが、結果として得たドルを報告. 他の要因には、損失の平均の勝利のような存在します, 利益率とシャープレシオ, しかし、彼らは、自動取引システムの設計の最終段階まで、あなたに有益な何かを教えていません.

戦略をテストへの正しいアプローチは、問題に焦点を当てるべきです, “私の戦略は、ごみの作品です?” ほとんどの人は、右の自分自身を証明しようとします. 本当のテストは、自分が間違っていることを証明することはできないことです. それを行うための唯一の方法は、統計的手法を介して行われ.

入口と出口の効率性

効率は、利用可能な取引レンジの何パーセントその戦略のキャプチャにハード番号を置きます. 取引ウィンドウは貿易が市場に参入したバーで開始. 時貿易の終了ウィンドウが閉じます.

利用可能な全ウィンドウは最高のマイナスウィンドウで最も低い低いです. 入口と出口の効率を計算することは、単にあなたの戦略をキャプチャする傾向がそのウィンドウの何パーセントを測定. 取引のすべての平均を取ると、あなたは全体の効率を得ます.

エントリ効率式

長い貿易のための式: (最高高 – 入口価格) ÷ (最高高 – 最低低)
短い貿易のための式: (入口価格 – 最低低) ÷ (最高高 – 最低低)

終了効率式

長い貿易のための式: (出口価格 – 最低低) ÷ (最高高 – 最低低)
短い貿易のための式: (最高高 – 出口価格) ÷ (最高高 – 最低低)

あなたがで架空の通貨を買う例を見てください 150 そして、でそれを販売 170. 入口と出口の時間と最低の低でした 140. The price then ran all the way up to 200 before settling back down to 170, which is where the exit took place.

The entry efficiency is (200-150) ÷ (200-140) = 50 ÷ 60 = 83%. Nearly anyone would agree that this makes for a great entry.
The exit efficiency is (170-140) ÷ (200-140) = 30 ÷ 60 = 50%. Most would agree that the exit would have ideally occurred sooner than it did.

Efficiencies do not change by instrument or time frame

One major problem that we encounter with forex backtests is the limited data set. This is especially true for those interested in testing long term strategies like those on the H4 or D1 charts. The wonderful thing about entry and exit efficiencies is that they do not vary from chart to chart or even period to period.

I like to jump down to M1 charts for efficiency testing. The data is nearly endless. 私は不足して心配する必要はありません. 私はH4チャートに戻って移行する際の素晴らしいところは、私が知っているということです, 効率は以上±5%を変更しないでください.

あなたが表示された場合、効率はあまり変化させます, あなたは統計的に有意なグループを形成するために十分な取引を持っていない可能性があり. 私の経験では、と言われます 75 取引は通常、実際の効率に非常に近い取得します. 100 取引以上が良いです. 私は、M1チャート上でテストを実行すると、, 私は、多くの場合、数ヶ月にわたって数千の取引を取得します. 大戦略のパラメータが本当にどれだけ強固な信頼の多大であなたを伝えることができることを数値.

通常, あなたがとることのできる範囲内にすべての結果 45-55% ランダムの結果であります, 確率過程. 私は右のようなものの障壁に忍び寄るbacktestsを見ると 54.9% あるいは 55.1%, バックの周りに結果必然的にタンク 50% マーク.

ランダム貿易の結果とドルの利益

私は、このセクションでは、ランダムな効率でお金を稼ぐ方法についてでした望みます. 悲しいかな, 我々は、ランダム性が不当eurphoriaをもたらすことができる方法をカバーしなければなりません.

私は今、数年前から乱数の概念に興味を持っていました. 数学者はより不透明な名前でそれを参照してください。 “確率過程”. 無意味名前にもかかわらず、, それはランダムの研究を言ってだけの空想の方法です – それはどのように変化します, その分布, どこまでそれ “あるきます”, など.

昨日, 私はコインのアナロジーがどのように記述するために使用されるフ​​リップ マーチンゲール戦略 確率的に失敗する運命にされています. 私は言及しなかった一つの興味深い概念はブラウン運動に関係します. でもランダムな結果のセットで, 取引は出発点から離れてランダムウォークに行きます.

アインシュタインは、コンセプトの背後に数学を解決するための本当のクレジットを取得, 彼の名前は、用語にないにもかかわらず、. 彼はランダムなプロセスが続く距離は試行回数の平方根であることを実証しました. 我々は、コインを反転することを決定した場合 60 回, 私達はことを知っています 50% 時間の頭の上に落下し、他の必要があります 30 尾の.

それは実際に私たちが勝者か敗者のいずれかの数が非常にわずかなバイアスを期待するべきであることが判明, 我々はどちらかわからないが、. それはランダムです. 正確なバイアス, どちらの方法それは行くことを好みます, 等しくなければなりません √60, これはうまくいく〜7. ヘッドの成果は、一般的にからの範囲であるべきです 23-37, 尾の結果が違いを構成すると.

60のうち七取引は強く割合を変化させます, 我々は、それが本当にことになっていることを知っていても 50%. ヘッドが付属している場合のみアップ 23 times out of 60, それです 38%. The problem is not with the coin. It’s with the number of trials. As you do an increasing large number of trails, the random bias decreases in significance in terms of the percent accuracy. 50,000 取引, たとえば, should show a surplus of roughly 223 trades in favor of winning or losing. The accuracy range falls within 1% の 50% on either side, a dramatic improvement.

Risks of curve fitting

Curve fitting a random efficiency relates to the idea of Brownian motion. Let’s say that we use a strategy that I know will never show an entry or exit efficiency: the moving average crossover. I’ve gone through this strategy six ways from Sunday, almost exclusively at the behest of clients. It does not work as a fully automated strategy. There is no secret set of fast and slow periods that will unlock the hidden keys to profit.

Most traders, experienced or not, abuse the backtester by searching for a set of parameters that yield the most dollar profit. They curve fit their test to optimize for maximum profit. What really happens is that the traders optimize for amount of random drift that already occurred.

When I used the example of 50,000 trades creating a natural drift of 223, I cited it with the purpose of showing how little it reduces the error in the real percent accurracy. The other consequence for trading systems is that as the error percentage 減少, the natural bias in your outcomes 増加. Blindly running the optimizer only selects the set of combination that yields a combination of two criteria:

  • The drift that happened to work out in favor of that set of parameters
  • The profit and loss that varies with those parameters. The dollar profit naturally changes because the two moving averages cross at different points

You need a tool like efficiency to guard against these types of random outcomes. It’s the only method that I know of that definitively states whether or not a strategy behaves in a random manner. I especially like the fact that it breaks those elements down into two of the three basic components of a trading strategy: the entry, the exit, and the position sizing.

Efficient strategies do not work all of the time

Position sizing marks the final obstacle to building your fully automated trading strategy. A set of rules that yields a statistically efficient entry that is paired with an efficient exit does not necessarily make money. The value of each trading setup can vary, あまりにも.

Each strategy contains different sets of winners and losers. Each winner and loser varies in its dollar value. Whatever money management approach that you take requires balancing the ratio of the winners and losers in a way that normalizes the outcome of each trade. You ideally want to eliminate the variation in dollar value. 20 pip trades should earn or lose you exactly as much as the 100 pip trades.

That seems counter-intuitive. Most traders want to win in proportion with the size of the opportunity. It’s better from a system perspective to entirely ignore the size of the opportunity and to make each trade worth the same amount. Betting more or less with each trade effectively normalizes the value of each trade.

Using a stop loss stands out as an obvious candidate to fix how much a trade is worth. The severe disadvantage is that it almost always negatively affects the exit efficiency. Whenever I can get away with it, I always recommend using a market based exit instead of an arbitrary stop loss. Traders usually scream at the top of their lungs when they hear me say this. I’m just speaking as a systems developer. The numbers are what they are.

以下の下でファイルさ: NinjaTrader ヒント, あなたの概念を歴史的にテストします。, 未分類 タグが付いて: バックテスト, efficiency, エントリ効率, 効率を終了します。, ninjatrader, 戦略, 取引戦略

正確なNinjaTraderのbacktests

12 月 2, 2011 によって ショーンオバートン 21 コメント

昨日, 私はどのようにについて少し書きました backtesterはダニをシミュレート. NinjaTrader停止とは、バーの範囲内で利益の秋を取るバーを検出した場合, それは常に停止が最初にヒットしたことを前提としてい.

私はこの問題は、制度のクライアントに彼の戦略を販売したいクライアントのために来ていました. 機関は戦略がより広範な市場の状況でどのように動作するかを理解するために、バックテストする能力を求めていました. ライブ結果のみがカバーされ 9 ヶ月, 投資家が情報に基づいた意思決定を行うためにためているが、それが困難になります. 信頼できます, 正確なバックテストは、私のクライアントは、販売を促進するためにできるようになります.

我々は最初の戦略をプログラムした場合, それはひどい失敗のように見えました. 結果から 45 すべての貿易の学位株式急落. 彼はで彼の停止を置きました 1/3 ATR の, そう自然に, NinjaTraderは、彼らがすべての時間をヒットされたことを想定.

我々は彼のために開発されたソリューションは、高を使用しました 時間枠 戦略は、実際に使用することをチャート, しかし、私たちはその後、何NinjaTraderのコールが含まれないようにコードを修正しました これは、粒度を入力しました. 基本的には, 我々はチック単位で目盛りに更新するために戦略を強制的にバックエンドでティックチャートを追加.

これは、実際にプログラムに非常に簡単です. 初期化関数で, あなたが入札を追加し、ダニ・チャートを依頼する必要があり.

保護されたオーバーライドボイドの初期化()
{
追加(文字列instrumentName, PeriodType.Tick, 1, MarketDataType.Bid);
追加(文字列instrumentName, PeriodType.Tick, 1, MarketDataType.Ask);
}

その後、, OnBarUpdateで() 関数, あなたは、コードは変更しません. あなたがする必要があるのは、単純なIF-THENドステートメントの中でそれを置くことです

保護されたオーバーライドボイドOnBarUpdate()
{
もし( BarsInProgress == 0 )
{
// ものを行います
}
}

バックテストの結果は、内来ました $5 の期間にわたって実際の取引結果の 9 ヶ月! 頻繁にバックテストは、不正確な結果につながるが、, 我々は、このような軽微なエラーで結果を再現するために興奮しました。.

この方法の主な欠点は、手動でソースコードの内部で楽器名を入力しなければならないということです, それをコンパイルします, 新しい機器のバックテストを実行するたびに. それは素晴らしい解決策ではありません, しかしNT7は、残念ながら、プログラムの初期化中からInstrumentNameを呼び出してサポートしていません。().

以下の下でファイルさ: NinjaTrader ヒント, あなたの概念を歴史的にテストします。, 未分類 タグが付いて: 加えます, バックテスト, 初期化します, ninjatrader, onbarupdate

MetaTrader is more popular than NinjaTrader

11 月 24, 2011 によって ショーンオバートン Leave a Comment

For all my gripes about MetaTrader, I must admit that they do the most important stuff very well. It’s very easy to download and install. Clicking on the desktop icon results in MT4 loading near instantaneously. When you log into the platform, charts immediately appear. The buttons at the top of the screen are obvious to anyone with trading experience. 要するに, it’s about as idiot proof as software gets.

Fumbling through NinjaTrader

All of the things that MetaTrader does well, NinjaTrader does very poorly. The first time that I downloaded the 42 MB installation file, NinjaTrader said that I couldn’t use it because I didn’t have the .NET 3.5 framework installed. That makes sense to me as a programmer. To people that do not program for a living (すなわち, the people reading this blog), that error message is next to worthless. NinjaTrader ought to handle this type of issue automatically.

Once I installed the program, I tried to open a chart. Nothing happened. I messed with it for about 5 minutes until I finally gave up and decided that the program wasn’t worth the effort.

I decided to try again a few months later, at which point I realized that NinjaTrader did not include a datafeed. So then I had to go through their list of 50+ vendors to figure out where I might find a decent forex feed to try using their platform. The feed that I happened to have, Interactive Brokers, required that I download a special version of their software. 当然のことながら, I did not figure this out until I got endless error messages and had to contact NinjaTrader suppport. An hour and several handfuls of hair later, I finally was able to do what MetaTrader allows me to do in seconds – look at a forex chart.

My Windows XP machine with 2 GB RAM, which is pretty typical of your average software user, takes about 20 seconds to load NinjaTrader. I have the nasty habit of closing and opening applications repeatedly. It gets on my nerves when I close NinjaTrader because it takes so long to get it back up again. I would consider leaving the application open, but I usually have 5-6 windows open within their platform. The taskbar always looks so cluttered. Call me crazy, but I find it very difficult to work on the computer with so many window tabs showing at the same time. It feels like there is too much going on visually.

Whenever you have a question about MetaTrader, you simply pick up the phone and call any MetaTrader broker. They answer your question immediately. NinjaTrader, in spite of its excellent online support, largely takes the help yourself approach. You can figure out most problems eventually, but it requires digging through forums and reading a few articles before you stumble upon the one with the answer. That type of self-help approach requires patience. Most people, especially us Americans that expect answers on the spot, are not blessed with that particular virtue.

Products and Add Ons

MetaTrader is like Google Android and NinjaTrader is like Apple. MetaQuotes takes the Android style, hands-off approach. Anything that does not interfere with the MetaTrader itself is allowed. “Allow” isn’t even the right word. MetaTrader is entirely removed from the process. The result is there are thousands of products available for sale that work exclusiely in MetaTrader. It’s an accidental ecosystem for trading products that relates directly to the approach so prevalent in social media and mobile phones.

NinjaTrader takes the Apple, big brother approach; all products are screened and vetted. This does come with some advantages. You’re a lot less likely to buy a total piece of garbage for NinjaTrader than you are for MetaTrader. ということで, the centralized also stifles the products on offer. Maybe it’s just because I’m Texan and resent anything that feels like authority making choices for me, but I think you see a lot more life and innovation when the people selling a related a product don’t have to ask permission to do so.

What does Ninjatrader do, とにかく?

You need to take a week’s worth of online training to really get a sense for how to use the product. NinjaTrader, for some odd reason, does not offer YouTube videos or any friendly beginners guides to get up and running. They require that you attend online webinars, which are always scheduled in the middle of the work day, in order to thoroughly learn each of the product’s main features.

When you open the software, it’s not at all apparent what exactly it’s supposed to do. Is it an automated trading platform? Is it a charting platform? Is it a tool for active traders? NinjaTrader does all of the above, but my opinion is that the software itself does a terrible job making this clear. Little things like a first-time walk after downloading through would help traders get over the steep learning curve and give the product a chance.

I actually love NinjaTrader, but it nearly takes a graduate degree to figure out how to use it. That’s the only reason that I’m so hesistant to recommend it to my メタトレーダープログラミング クライアント. Once you figure out how to use the tools, they are incredibly powerful. The built in trading analytics eliminate the need for MetaTrader related sites like MyFXBook and MT4Stats for viewing and studying my daily performance. Comparing MetaTrader and NinjaTrader in the backtester is not even worth doing: NinjaTrader is infinitely superior. It’s too bad that NinjaTrader gets in its own way.

The features that NinjaTrader offers should make it way more popular than MetaTrader. I just don’t see that happening any time soon with how long it takes to learn the software.

以下の下でファイルさ: メタト レーダーのヒント, NinjaTrader ヒント, 未分類 タグが付いて: メタト レーダー, ninjatrader

  • « Previous Page
  • 1
  • 2
  • 3
メールで無料の取引戦略

トレンド分析

申し訳ありませんが. No data so far.

アーカイブ

  • ルール
  • 外国為替市場のしくみ?
  • インジケーター
  • メタト レーダーのヒント
  • MQL (オタクのため)
  • NinjaTrader ヒント
  • Pilum
  • QB プロ
  • お金を失うことを停止します。
  • あなたの概念を歴史的にテストします。
  • 戦略の取引のアイデア
  • 未分類
  • What's happening in the current markets?

翻訳


無料の取引戦略

プライバシー ポリシーRisk Disclosure

著作権 © 2022 OneStepRemoved.com, (株). すべての権利予約.