Reply

-$30k on hours 0 and 1? [with pic]

2 replies

4xtasy

Subscriber, bbp_participant, community, 2 replies.

Visit profile

7 years ago #116203

Under trade analysis, it says I lost $30,000 on hours 0 and 1. This is when the EA closes a trade, I presume?

How could I use this info to make the EA better? This is for years 2012-2016.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #141080

Hello,

 

it takes trade opening time into consideration. If you want to filter these times out you need to add a time condition into your EA

// Variables
extern string TradeStartTime = "2:00";
extern string TradeStopTime = "23:59";

if(TimeCurrent()>StrToTime(TradeStartTime) && TimeCurrent()<StrToTime(TradeStopTime)) {
...here goes the original trading rules (code) ...
}

0

MFXS

Subscriber, bbp_participant, community, 9 replies.

Visit profile

7 years ago #141427

Hey Tomas, what language is that? It looks a little simpler than MQL4, or was this just a generic logical example? I’ve avoided working with time in MQL4 so to get around this same issue on my 4h strategy I used something along the lines of:

bool NotFirstBar = iVol(NULL,1440,0) > iVol(NULL,240,0);

if(NotFirstBar)bool Buy;
//(Current daily volume greater than current 4 hour volume - this is only ever false for the first bar of the day)

Under trade analysis, it says I lost $30,000 on hours 0 and 1. This is when the EA closes a trade, I presume?

How could I use this info to make the EA better? This is for years 2012-2016.

 

FYI this is actually just a difficult period of the day to trade. Very low liquidity, only Sydney and NZ online. Larger time frame signals occur here, but pair often ranges against the signal through Asia. The yuan fix a few hours later tends to clear things up.

0

Viewing 2 replies - 1 through 2 (of 2 total)