stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Bob's Biggest Balls Ever
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1375
Page 26 of 26
Author:  snailbeard [ Mon Mar 04, 2013 8:49 pm ]
Post subject:  Re: Bob's Biggest Balls Ever

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
Author:  snailbeard [ Tue Mar 05, 2013 11:14 pm ]
Post subject:  Re: Bob's Biggest Balls Ever

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
Author:  SteveHopwood [ Tue Mar 05, 2013 11:39 pm ]
Post subject:  Re: Bob's Biggest Balls Ever

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
All times are UTC Page 26 of 26