Zennor's Piproid

Post your derivatives/discussion threads here.
Post Reply
AGT
Trader
Posts: 889
Joined: Thu Nov 17, 2011 7:20 pm
Location: Germany

Zennor's Piproid

Post by AGT »

I let it run during the NFP. It could better perform switching off the EA.
Anyway, so, now we got (another) lesson.

I think all ZP users here got that loss.

One of my ZP accounts din't got that loss, bcz it closed a basket earlier - but that was preumably only luck ! :?
pakeha
Trader
Posts: 78
Joined: Tue Nov 06, 2012 3:20 am
Location: Canada

Zennor's Piproid

Post by pakeha »

AGT » Sat May 09, 2015 4:03 am wrote:I let it run during the NFP. It could better perform switching off the EA.
Anyway, so, now we got (another) lesson.

I think all ZP users here got that loss.

One of my ZP accounts din't got that loss, bcz it closed a basket earlier - but that was preumably only luck ! :?
I don't post often, but thought I would wade in here:).

IMHO, It's unrealistic to assume any EA can consistently do well being in a trade prior to major news events like NFP or rate decisions. It's only on limited occasions that professional traders will take positions prior to major news (e.g currency is weak and news is expected to weaken it further). Most trade post news to capture the continuation. So, agree totally, best to switch the EA off prior to major news. Some EAs I have used in the past had a news filter to keep you out - the best one I experienced was Kangaroo. Not sure whether that is something Steve and others have also tried successfully in the past and have the logic/code to embed in any EA?

Cheers
AnotherBrian

Zennor's Piproid

Post by AnotherBrian »

NFP code if anyone is interested in incorporating it. I use this on almost all of my bots.
This will prevent new trades from opening. You'll have to figure out if you want open trades to close or not.
Up to big Steve if he wants to incorporate.

Code: Select all

   if(!Trade_NFP_Friday && DayOfWeek()==5 && Day()<=7)//is it the first friday of the month?
     { 
      CanTrade=false;      
     }
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Zennor's Piproid

Post by SteveHopwood »

AnotherBrian » Sat May 09, 2015 5:19 pm wrote:NFP code if anyone is interested in incorporating it. I use this on almost all of my bots.
This will prevent new trades from opening. You'll have to figure out if you want open trades to close or not.
Up to big Steve if he wants to incorporate.

Code: Select all

   if(!Trade_NFP_Friday && DayOfWeek()==5 && Day()<=7)//is it the first friday of the month?
     { 
      CanTrade=false;      
     }
Brilliant idea. Thanks. I will indeed incorporate it. :clap: :clap: :clap:

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

Zennor's Piproid

Post by renexxxx »

AnotherBrian » Sun May 10, 2015 3:19 am wrote:NFP code if anyone is interested in incorporating it. I use this on almost all of my bots.
This will prevent new trades from opening. You'll have to figure out if you want open trades to close or not.
Up to big Steve if he wants to incorporate.

Code: Select all

   if(!Trade_NFP_Friday && DayOfWeek()==5 && Day()<=7)//is it the first friday of the month?
     { 
      CanTrade=false;      
     }
Last weeks' NFP was on Friday, the 8th. Not sure what the rule is. Is there ever a NFP on Friday the 1st? If not "Day() <=7" should become "Day()>=2 && Day()<=8"
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Zennor's Piproid

Post by SteveHopwood »

renexxxx » Sat May 09, 2015 9:28 pm wrote:
AnotherBrian » Sun May 10, 2015 3:19 am wrote:NFP code if anyone is interested in incorporating it. I use this on almost all of my bots.
This will prevent new trades from opening. You'll have to figure out if you want open trades to close or not.
Up to big Steve if he wants to incorporate.

Code: Select all

   if(!Trade_NFP_Friday && DayOfWeek()==5 && Day()<=7)//is it the first friday of the month?
     { 
      CanTrade=false;      
     }
Last weeks' NFP was on Friday, the 8th. Not sure what the rule is. Is there ever a NFP on Friday the 1st? If not "Day() <=7" should become "Day()>=2 && Day()<=8"
Good point.

Ye Gods but I am an idiot. <Ignores cries of "Yes, we know.">

I really must stop taking any notice of all this angst about news releases. You would think I would know better after nearly 10 years in this business.

Hey ho. Once born an idiot, there is not a lot of looking back that does any good.

Why would I bother to code for people too lazy/ignorant/stupid to remove an ea in advance of NFP?

Forget it guys. It aint going to happen here, to PPoS or any other bot I code. Learn to read a calendar. Then learn how to disable so-called 'Experts'.

Moving on, why are lumps of software written to handle our trading for us described as, "Expert Advisors"?

Anybody here ever got any actual advice from one of them? Surely, an 'advisor' picks up the phone and says, "Ehup feller. Here is what you need to do..............." He doesn't merely do it for you. And then lose shed-loads of cash because he was rubbish.

Sorry. Clearly not in an especially good mood tonight. Clearly feeling somewhat jaundiced. Hey ho. Ignore me.

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

Zennor's Piproid

Post by renexxxx »

WikiPedia tells us this about the Non-Farm payroll dates:
WikiPedia wrote:The Bureau of Labor Statistics releases preliminary data on the third Friday after the conclusion of the reference week, i.e., the week which includes the 12th of the month, at 8:30 a.m. Eastern Time;[5] typically this date occurs on the first Friday of the month.
Converting this rule to MQL we get something like this:

Code: Select all

bool isNFP(datetime date=-1) {

   static const int DAY  = 60*60*24;
   static const int WEEK = 7*DAY;
   
   datetime thisDate = (date < 0) ? iTime(Symbol(),PERIOD_D1,0) : date;

   bool nfp = false;
   
   if ( TimeDayOfWeek(thisDate) == 5 ) {

      // So, the given date is a Friday. Go back three weeks and see if the 12th falls in that week
      datetime dateStart = thisDate - 5*DAY - 3*WEEK;   // This would be a SUNDAY three weeks ago
      datetime dateEnd   = dateStart + 1*WEEK;
      for(datetime iDay = dateStart; iDay < dateEnd; iDay += DAY) {
         if ( TimeDay(iDay) == 12 ) {
            nfp = true;
            break;
         }
      }
   }
   
   return(nfp);
}
However, not everything that can be automated, should be. I totally agree with Steve that if you are too lazy or stupid to look at the Forex Calendar and are not able to make up your mind whether you should be trading on a NFP day, you should probably not be trading Forex.
AnotherBrian

Zennor's Piproid

Post by AnotherBrian »

I'm a bit lazy, and a bit stupid, but I'm smart enough to know that I can't turn off the EA from 30,000 feet in the air. I travel for work sometimes and don't have the luxury, connection, or time (or memory) to turn the bot off manually, so I let it do it's thing with this code bit. I use that formula because (I thought) it covers any scenario of Fridays, I really don't care much if I miss trading a Friday when there is no NFP.

Removing the EA doesn't work for me either because I still want it to manage to order (trailing stops) but I don't want any new entries. This thread is about ZP - and I actually do use the stop features.

It works for me. No worries if you don't add it, I can do that myself, and non-coders will have to step up and attend to the platform!! (or learn to code).

Renexxxxxx - your coding skills blow my brains out! (I read your matrix code - wow)
plateman
Trader
Posts: 43
Joined: Wed Nov 16, 2011 9:25 am

Zennor's Piproid

Post by plateman »

So far this bot seems fairly resilient, I note that a few on here had losses on Friday, I assume that they have a SL on their trades. I trade live with no SL/TP on the trades, a 3% basket closure and a 15% shirt protection.
Friday it went about 9% down but recovered for a 3% basket closure this morning.
qvintus
Trader
Posts: 220
Joined: Sat Nov 30, 2013 7:02 pm

Zennor's Piproid

Post by qvintus »

plateman » 11 May 2015, 12:16 wrote:So far this bot seems fairly resilient, I note that a few on here had losses on Friday, I assume that they have a SL on their trades. I trade live with no SL/TP on the trades, a 3% basket closure and a 15% shirt protection.
Friday it went about 9% down but recovered for a 3% basket closure this morning.
Nice :-)
But your RR is very bad, 5:1. Only for the brave.
Post Reply

Return to “Pipcruiser's Pipmasher forum”