読み取り専用

フォーラムは現在、読み取り専用のアーカイブとなっています。.

バグ報告やプラットフォームに関する質問はこちら → [email protected]

私たちのコミュニティはDiscordとYouTubeで活動しています。ぜひ参加してください!

ご参加ください Discord YouTube

Exclude date ranges

1件の返信

ブレット・パティソン

登録者、bbp_participant、2件の返信。.

プロフィールを表示

3年前 #282005

こんにちは、,

For long term trading strategies I use the SKEW as a trade filter, ie. when not to trade and go to cash.

In SQX, how would I go about creating a date filter to prevent trading during set dates.

例:

01 Oct. 2018 – 30th Dec 2018

01 Jan. 2020 – 30th March 2020

Ideally I would like to add or remove from any strategy at will, so happy if it is a custom block or trade signal or any other recommendation.

This is what it would look like in MT5:

//SKEW Trade Filter for MT5

input datetime InpSkipFrom2020 = D’1.1.2020′;

input datetime InpSkipTill2020 = D’1.4.2020′;

input datetime InpSkipFrom2022 = D’1.1.2022′;

input datetime InpSkipTill2022 = D’30.10.2022′;

0

Tomas Matejka

管理者、sq-ultimate、2件の返信.

プロフィールを表示

3年前 #282011

こんにちは、,

there are basically at least 2 ways of doing this.

First you could make a new custom block that will represent “calendars” of those days. You can check here for more information https://strategyquant.com/codebase or request help directly here https://strategyquant.com/codebase/request-coding/

Another way would be a use of a custom function in MQL5 (MT5). The function would also return True / False based on where today’s date is matching your calendar.

You place the MQL function into this file \user\extend\Code\MetaTrader5\CustomFunctions\CustomFunctions.mq5 and refer to it in AlgoWizard – see the pic attached

添付ファイル:
に違いない ログインしました 添付ファイルを表示するには.

0

1件の返信を表示中 - 1 - 1件目 (全1件中)