読み取り専用

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

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

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

ご参加ください Discord YouTube

EA

4件の返信

MasterSye

サブスクライバー、bpb_participant、コミュニティ、80件の回答。.

プロフィールを表示

11年前 #114183

Hi. Can anyone provide a sample code or logical operation where EA detects high impact news and avoids trading during the release? I know such may need a custom indicator like FF cal, and I have a copy of it. It’s just that I don’t know how to go around using it in the EA wizard. Any suggestion is greatly appreciated. Thanks in advance.

0

Tomas Matejka

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

プロフィールを表示

11年前 #132592

This is not a standard function EA Wizard would support. You can try to measure time difference between ticks but it does not say anything since you can have high volatility environment – very fast market and still no news and reports. This would be very difficult or maybe impossible to achieve using Wizard.

 

Other option would be editing directly your MQ4 strategy. Using some XML parsing functions in MQL4 and this forexfactory XML feed http://www.forexfactory.com/ffcal_week_this.xml you could read oncoming news and avoid trading at those times

0

MasterSye

サブスクライバー、bpb_participant、コミュニティ、80件の回答。.

プロフィールを表示

11年前 #132611

Hi Tomas. Thanks for replying. I found this piece of code for the news filter. Can you please check if I could use it? If so, where do you think I should place it inside the generated code? 

 

extern bool AvoidNews=true;
extern int MinimumImpact=1;
extern int MinsBeforeNews=30;
extern int MinsAfterNews=30;

 

bool ContinueTrading=true;
if(AvoidNews)
{
static int PrevMinute=-1;

int MinSinceNews=iCustom(NULL,0,”FFCal”,true,true,false,true,true,1,0);
int MinToNews=iCustom(NULL,0,”FFCal”,true,true,false,true,true,1,1);

int ImpactSinceNews=iCustom(NULL,0,”FFCal”,true,true,false,true,true,2,0);
int ImpactToNews=iCustom(NULL,0,”FFCal”,true,true,false,true,true,2,1);

if(Minute()!=PrevMinute)
{
PrevMinute=Minute();
if((MinToNews=MinimumImpact) || (MinSinceNews=MinimumImpact))ContinueTrading=false;
}

}

 

it says that in each entry conditions, below should be added:

 

&& ContinueTrading

 

Thanks in advance for any help you can provide me. 

0

Tomas Matejka

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

プロフィールを表示

11年前 #132720

You could add this right before // Entry Long line and then add && ContinueTrading into long/short conditions

You have to also install FFCal indicator into MetaTrader to make it work

0

MasterSye

サブスクライバー、bpb_participant、コミュニティ、80件の回答。.

プロフィールを表示

11年前 #132729

I have several rules in my strategy. Do I place that same code in every long rule?

0

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