Bob's Biggest Balls Ever

Post Reply
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Re: Bob's Biggest Balls Ever

Post by snailbeard »

After looking the code relating to TrendTradingDoneForToday,
I made the following change to my copy of BBBE:

Code: Select all

      //We only want one trend trade a day
      if( TrendTradingDoneForToday == false ) //BWA skip if check not required
      {
         //if (TimeDayOfWeek(OrderOpenTime()) == TimeDayOfWeek(TimeLocal()) ) 
         //BWA 04Mar2013 Changed TimeLocal() to TimeCurrent()
         //BWA 04Mar2013 Changed TimeDayOfWeek() to TimeDayOfYear() & DayOfYear()
         if ( TimeDayOfYear(OrderOpenTime()) == DayOfYear() ) 
         {
            TrendTradingDoneForToday = true;
 
The previous logic turns off trend trading on the same day of the following week if the trade is still running.

Cheers
Snailbeard
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Re: Bob's Biggest Balls Ever

Post by snailbeard »

pip factor and stop loss issue

I made a change to 'GetMarketInfo(string symbol)'.

I was investigating why this scalp trade stop loss was moved when the price had only moved 3 pips:

//09:22:07 2012.12.12 00:34 BWA_BobsBiggestBallsEver_ver_1m GBPUSD,M1: open #2 buy 0.01 GBPUSD at 1.61158 ok
// 1.61158
// - 0.00200
// = 1.60988
//09:22:07 2012.12.12 00:34 BWA_BobsBiggestBallsEver_ver_1m GBPUSD,M1: modify #2 buy 0.01 GBPUSD at 1.61158 sl: 1.60958 tp: 1.62158 ok
//Price just touched 1.61188
//______________ - 1.61158
//_____________ = 0.00030 only 3 pips
//09:22:07 2012.12.12 01:51 BWA_BobsBiggestBallsEver_ver_1m GBPUSD,M1: modify #2 buy 0.01 GBPUSD at 1.61158 sl: 1.61058 tp: 1.62158 ok
//09:22:07 2012.12.12 05:46 Tester: stop loss #2 at 1.61058 (1.61059 / 1.61088)

I found an issue in

void GetMarketInfo(string symbol)

although I don't know yet if this is the cause of the stoploss issue:

'factor = PFactor(symbol);'

should be done before 'factor' is used to calculate 'spread'.

Cheers
Snailbeard
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.

Re: Bob's Biggest Balls Ever

Post by SteveHopwood »

Guys, no intention of interrupting the coding discussions here - carry on and learn what you can from them.

You do realise, don't you, that all this is superseeded by 10.4? If you do not, then you have been taking no notice of my various heads-up etc pm's.

No criticism intended - just making sure you are all aware. Feel free to carry on here as before - no telling what you might discover that will benefit the rest of us.

:D
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.
Post Reply

Return to “Automated trading systems”