• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 3:24am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 3:24am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Nanningbob 4h trading system ver. 5.0 4,432 replies

Nanningbob 60x90 EA 3,920 replies

Require help amending Nanningbob v10 EA 0 replies

Help regarding NanningBob EA 27 replies

Nanningbob 4H trading system 2,017 replies

  • Commercial Content
  • /
  • Reply to Thread
  • Subscribe
  • 40
Attachments: BigBob: Nanningbob V10 auto-trading robot by SteveHopwood
Exit Attachments
Tags: BigBob: Nanningbob V10 auto-trading robot by SteveHopwood
Cancel

BigBob: Nanningbob V10 auto-trading robot by SteveHopwood

  • Last Post
  •  
  • 1 910Page 111213 19
  • 1 10Page 1112 19
  •  
  • Post #201
  • Quote
  • Aug 26, 2011 4:19am Aug 26, 2011 4:19am
  •  SteveHopwood
  • | Commercial Member | Joined Apr 2007 | 8,331 Posts
Quoting osthafen
Disliked
Hi Steve,

I'm testing all parts of the EA and while I was testing the Range-Trade without recovery the behaviour was strange.

I think I found something in the code where parts are for recovery where they shouldn't be and some parts where a range part is missing:

This part:
//Long
if (target == 0) target = 1000000;//Dummy value

if ( Var5 < Var3 && Bid < Var3 && Bid < target)

I think prevents the target variable in "no recovery mode" from stopping the condition - which is CORRECT.

But further down in the short part:

//Short
if ( Var5...
Ignored
Fabulous. Thanks. We would eventually have noticed that the only sells in range trading were recovering a buy, but it might have taken a while.

The fix for this is in post 1. The fix is essential.

Those of you who can, go to void LookForRangeTradingOpps(). Scrool down to the //Short section. The next code snippet need to be:
Inserted Code
//Short
if (target == 1000000) target = 0;//Dummy value
if ( Var5 > Var1  && Bid > Var1 && Bid > target)//B version plus Recovery
You will see the dummy value line is missing, so copy/paste it in, save the file, shut down and restart the platform and the compiled code will have the new conditional with your settings intact (re-compiling from within the editor destroys your settings).

Cheets osthafen. You are a star.

 
 
  • Post #202
  • Quote
  • Aug 26, 2011 4:28am Aug 26, 2011 4:28am
  •  SteveHopwood
  • | Commercial Member | Joined Apr 2007 | 8,331 Posts
Quoting osthafen
Disliked
I think it's because the StartCarolco() function which includes the deletion of the pendings is only called if in trend mode:

PHP Code
 
   
if (trend != ranging && AllowTrendTrading && Volatility >= MinimumTrendTradingVolatility) 
   {
      if (!
UseCaterpillar && !UseCarolco && !StopTrading && TicketNo == -1) LookForTrendTradingOpps();
      if (
UseCaterpillar && !StopTrading) StartCaterpillar();
      if (
UseCarolco && !StopTrading) StartCarolco();
      
   } 
So if the trend switches to range there could be some pendings left open ?
Ignored
Yes. A trade that originates as a Trend trade cannot suddenly become a Range trade simply because the D1 candle's high or low lies within the two moving averages. To do so risks adding to a losing trade on a pair whose volatility calculations suggest it is likely to trend for long periods of time. We all know what happens when we have L2+ Recovery trades in place, and the market hurtles in the wrong direction.

Having the ability to convert Range to Trend trades does make sense, which is why I have included this facility.

The screen feedback might benefit from some attention. At the mo, it describes the market as trending or ranging according to the position of the D1 candle hi-lo in respect to the moving averages, not open trades. I might do something about this at some point to make things clearer but it is not a priority.

 
 
  • Post #203
  • Quote
  • Aug 26, 2011 5:33am Aug 26, 2011 5:33am
  •  ixbone
  • | Commercial Member | Joined Oct 2008 | 70 Posts
Backtesting EU 99% Quality, lotsize 0.1, 10k balance 1.1.2008-03.24.2011

in general, a really nice and stable ea, maybe some backtesting optimization can bring some better results, especially timeframe settings, which is currently hardcoded to 1440, all settings default, except lot size.

some errors: 2011.08.26 11:19:47 2011.04.18 04:00 BigBob EURUSD,Daily: EURUSD OP_BUY order send failed with error(4107): invalid price parameter for trade function


cheers

IX
Attached Image (click to enlarge)
Click to Enlarge

Name: TesterGraph.gif
Size: 10 KB
 
 
  • Post #204
  • Quote
  • Aug 26, 2011 7:09am Aug 26, 2011 7:09am
  •  SteveHopwood
  • | Commercial Member | Joined Apr 2007 | 8,331 Posts
carolco grid trades are left behind when:

 

  1. both the initial trades have closed
  2. the hi-lo of the D1 candle is inside the moving averages, so BB regards the market as ranging and does not call the function that manages carolco grid trades.

Fix for this in post 1. For those of you able to edit your own code, here is int start() with the new code highlighted in red, towards the end of the function.

Inserted Code
int start()
{
//----

   //A little bit of code to turn off functions that I do not want to remove yet in case we turn out to need them
   int x = 0;

   //Read a pair's volatility
   if (D1VolatilityBars != iBars(NULL, PERIOD_D1) )
   {
      D1VolatilityBars = iBars(NULL, PERIOD_D1);
      Volatility = CalculateVolatility(PERIOD_D1, LookBackDays);
      CalculateReEntryLinePips();//Range trade Rocovery
   }//if (D1VolatilityBars != iBars(NULL, PERIOD_D1)
   
   
   //ReadIndicatorValues() contains the call to TrendDetectionModule()
   ReadIndicatorValues();
   
   //Other stuff associated with trend trading
   if (trend != ranging)
   {
      GetTrendConfirmationCandleDir();      
   }//if (trend != ranging)
   
   
   static bool TradeExists = false;
   
   if (OrdersTotal() == 0)
   {
      TicketNo = -1;
      ForceTradeClosure = false;
   }//if (OrdersTotal() == 0)

   if (ForceTradeClosure) 
   {
      CloseAllTrades();
      return;
   }//if (ForceTradeClosure) 

   if (trend == ranging) ReadIndicatorValues();

   
      
   ///////////////////////////////////////////////////////////////////////////////////////////////
   //Find open trades.   
   CountOpenTrades();
   if (!BuyOpen && !SellOpen) 
   {
      GlobalVariableDel(GvName);//Make sure there are no probs from this source      
      TradeOrigin = none;
      OpenTrades = 0;
   }//if (!BuyOpen && !SellOpen) 
     
   //Manage a single open trade's possible closure
   if (OpenTrades == 1)
   {
      if (OrderSelect(TicketNo, SELECT_BY_TICKET) && OrderCloseTime() == 0)
      {
         if (TradeOrigin == trendorigin) LookForTradeClosure();         
      }//if (OrderSelect(TicketNo, SELECT_BY_TICKET) || OrderCloseTime() == 0) )       
   }//if (OpenTrades == 1)
   
   //Deal with hedged pair
   if (HedgingInProgress && BasketUpl >= HedgeProfitTarget)
   {
      CloseAllTrades();
      return;
   }//if (HedgingInProgress && BasketUpl >=)
   
   //Tidying up
   if (OpenTrades == 0)
   {
      ObjectDelete(breakevenlinename);
      ObjectDelete(reentrylinename);
      
   }//if (OpenTrades == 0)
   
   if (x == 1) //Function turned off for now
   {
      TradeExists = DoesTradeExist();
      if (TradeExists)
      {
         if (OrderProfit() > 0) TradeManagementModule();
         LookForTradeClosure();
      }//if (TradeExists)
   }//if (x == 1) //Function turned off for now
   
   ///////////////////////////////////////////////////////////////////////////////////////////////
   //Recovery
   if (UseRecovery && TradeOrigin == rangeorigin)
   {
      if (OpenTrades >= Start_Recovery_at_trades) RecoveryInProgress = true;
      
      
      
      //Replace accidentally deleted be line
      if (RecoveryInProgress && ObjectFind(breakevenlinename) == -1)
      {
         RecoveryModule();      
      }//if (RecoveryInProgress && ObjectFind(breakevenlinename) == -1)
      
      //Recovery trailing sl
      if (RecoveryInProgress && UseRecoveryTrailingStop)
      {
         RecoveryCandlesticktrailingStop();     
      }//if (RecoveryInProgress && UseRecoveryTrailingStop)
      
      
   }//if (UseRecovery)

   //Replace deleted reentry line
   if (RecoveryInProgress && ObjectFind(reentrylinename) == -1)
   {
      ReplaceReEntryLine();
   }//if (RecoveryInProgress && ObjectFind(reentrylinename) == -1)
   /////////////////////////////////////////////////////////////////////////////////////////////////////////////////

   ///////////////////////////////////////////////////////////////////////////////////////////////
   
   //Trading times
   bool TradeTimeOk = CheckTradingTimes();
   if (!TradeTimeOk)
   {
      Comment("Outside trading hoursnstart_hourm-end_hourm: ", start_hourm, "-",end_hourm, "nstart_houre-end_houre: ", start_houre, "-",end_houre);
      return;
   }//if (hour < start_hourm)
   /////////////////////////////////////////////////////////////////////////////////////////////////////////////////

   //Available margin filters
   EnoughMargin = true;//For user display
   MarginMessage = "";
   if (UseScoobsMarginCheck && OpenTrades > 0)
   {
      if(AccountMargin() > (AccountFreeMargin()/100)) 
      {
         MarginMessage = "There is insufficient margin to allow trading. You might want to turn off the UseScoobsMarginCheck input.";
         DisplayUserFeedback();
         return;
      }//if(AccountMargin() > (AccountFreeMargin()/100)) 
      
   }//if (UseScoobsMarginCheck)


   if (UseForexKiwi && AccountMargin() > 0)
   {
      
      double ml = NormalizeDouble(AccountEquity() / AccountMargin() * 100, 2);
      if (ml < FkMinimumMarginPercent)
      {
         MarginMessage = StringConcatenate("There is insufficient margin percent to allow trading. ", DoubleToStr(ml, 2), "%");
         DisplayUserFeedback();
         return;
      }//if (ml < FkMinimumMarginPercent)
      
   }//if (UseForexKiwi && AccountMargin() > 0)

   ///////////////////////////////////////////////////////////////////////////////////////////////         
   //Trading. 
   //Trend trading
   if (trend != ranging && AllowTrendTrading && Volatility >= MinimumTrendTradingVolatility) 
   {
      if (!UseCaterpillar && !UseCarolco && !StopTrading && TicketNo == -1) LookForTrendTradingOpps();
      if (UseCaterpillar && !StopTrading) StartCaterpillar();
      if (UseCarolco && !StopTrading) StartCarolco();      
   }//if (trend != ranging && AllowTrendTrading && Volatility <= MaximumRangeTradingVolatility)       
   
  [color=Blue] [color=Red]//Fix for carolco initial trade closing and leaving behind pending trades when the hi-lo of the D1 candle has
   //moved into Ranging
   if (trend == ranging && UseCarolco)
   {
      if (!BuyOpen && !SellOpen && (NoOfPendingBuys > 0 || NoOfPendingSells > 0) )
      {
         DeletePendings();
      }//if (!BuyOpen && !SellOpen && (NoOfPendingBuys > 0 || NoOfPendingSells > 0) )   
   }//if (trend == ranging && UseCarolco)
   [/color][/color]
  
   if (TradeEveryTick) OldRangeTradingBars = 0;//Look for trades every tick, not every candle
   //Range trading opps need checking even though there may a trade already open, else the open trade never gets closed
   if (trend == ranging && AllowRangeTrading && OldRangeTradingBars != iBars(NULL, RangeTradingTF) && Volatility <= MaximumRangeTradingVolatility) 
   {
      OldRangeTradingBars = iBars(NULL, RangeTradingTF);
      LookForRangeTradingOpps();
   }//if (trend == ranging && AllowRangeTrading && OldRangeTradingBars != iBars(NULL, RangeTradingTF)) 

   ///////////////////////////////////////////////////////////////////////////////////////////////      

   DisplayUserFeedback();
   
//----
   return(0);
}
//+------------------------------------------------------------------+
 
 
  • Post #205
  • Quote
  • Aug 26, 2011 7:51am Aug 26, 2011 7:51am
  •  Viv108
  • | Joined Jan 2009 | Status: Member | 533 Posts
Quoting ixbone
Disliked
Backtesting EU 99% Quality, lotsize 0.1, 10k balance 1.1.2008-03.24.2011

in general, a really nice and stable ea, maybe some backtesting optimization can bring some better results, especially timeframe settings, which is currently hardcoded to 1440, all settings default, except lot size.

some errors: 2011.08.26 11:19:47 2011.04.18 04:00 BigBob EURUSD,Daily: EURUSD OP_BUY order send failed with error(4107): invalid price parameter for trade function


cheers

IX
Ignored

Are these default settings? Not a bad curve at all. Would be interested to see the drawdown. Also, only very many trades compared to how the manual method trades.
 
 
  • Post #206
  • Quote
  • Aug 26, 2011 8:30am Aug 26, 2011 8:30am
  •  hiredwhip
  • | Joined Nov 2009 | Status: Member | 4,980 Posts
Good Morning Steve,
Made a quick pass with the EU over the same 2 year track.....All conditions the same as last time......If there is something really wrong here i can't see it...It's been very steady.....This is your latest update....

Have a great day

whip
Attached File(s)
File Type: pdf Strategy Tester_ BigBob.pdf   87 KB | 409 downloads
 
 
  • Post #207
  • Quote
  • Aug 26, 2011 9:01am Aug 26, 2011 9:01am
  •  Viv108
  • | Joined Jan 2009 | Status: Member | 533 Posts
Hey whip..

Your drawdown is 65%... that's pretty steap. On a 10K account, you probably wont be able to trade another pair.
 
 
  • Post #208
  • Quote
  • Aug 26, 2011 9:25am Aug 26, 2011 9:25am
  •  hiredwhip
  • | Joined Nov 2009 | Status: Member | 4,980 Posts
Quoting Viv108
Disliked
Hey whip..

Your drawdown is 65%... that's pretty steap. On a 10K account, you probably wont be able to trade another pair.
Ignored
Sorry......Been posting this but failed to this time.......NO MM filters, Pair filters
or Swap filters ticked.......DD is for another day, I want to see it trade now...
 
 
  • Post #209
  • Quote
  • Aug 26, 2011 9:29am Aug 26, 2011 9:29am
  •  ixbone
  • | Commercial Member | Joined Oct 2008 | 70 Posts
Quoting Viv108
Disliked
Are these default settings? Not a bad curve at all. Would be interested to see the drawdown. Also, only very many trades compared to how the manual method trades.
Ignored
Yes, except the lot size
0.1 lot dd 48%
original 0.02 12% dd

if you decrease the lot size to default 0.02 you can trade serveral pairs

99% backtesting quality is based on dukascopy data, if ea's survives 2008-2011 (crisis - fukushima), they are stable and have potential for a closer inspect = optimization

cheers

IX
 
 
  • Post #210
  • Quote
  • Aug 26, 2011 9:33am Aug 26, 2011 9:33am
  •  ixbone
  • | Commercial Member | Joined Oct 2008 | 70 Posts
Quoting hiredwhip
Disliked
Good Morning Steve,
Made a quick pass with the EU over the same 2 year track.....All conditions the same as last time......If there is something really wrong here i can't see it...It's been very steady.....This is your latest update....

Have a great day

whip
Ignored
sorry whip,

but 50% backtesting quality is useless, minimum 90% = OK, 99% = near perfect <=1%

cheers

IX
 
 
  • Post #211
  • Quote
  • Aug 26, 2011 9:38am Aug 26, 2011 9:38am
  •  hiredwhip
  • | Joined Nov 2009 | Status: Member | 4,980 Posts
Quoting ixbone
Disliked
sorry whip,

but 50% backtesting quality is useless, minimum 90% = OK, 99% = near perfect <=1%

cheers

IX
Ignored
Useless I don't agree with........Not perfect, I agree with
 
 
  • Post #212
  • Quote
  • Aug 26, 2011 9:46am Aug 26, 2011 9:46am
  •  ixbone
  • | Commercial Member | Joined Oct 2008 | 70 Posts
Quoting hiredwhip
Disliked
Useless I don't agree with........Not perfect, I agree with
Ignored
sorry, you accept 50% error rate, wrong signals, no signals?

fyi:
90% metatrader data ist based and calculated on daily high and lows!
99% is based on every tick!

cheers

IX
 
 
  • Post #213
  • Quote
  • Aug 26, 2011 10:12am Aug 26, 2011 10:12am
  •  hiredwhip
  • | Joined Nov 2009 | Status: Member | 4,980 Posts
Quoting ixbone
Disliked
sorry, you accept 50% error rate, wrong signals, no signals?

fyi:
90% metatrader data ist based and calculated on daily high and lows!
99% is based on every tick!

cheers

IX
Ignored
Sorry I'm feeding horses ......Relax you are not telling me anything I don't know, but I'll stand on my last post.....

Have a great day

whip
 
 
  • Post #214
  • Quote
  • Aug 26, 2011 10:17am Aug 26, 2011 10:17am
  •  spyderman
  • Joined Nov 2010 | Status: Snaggin' Some Pips | 2,157 Posts
Has anyone gotten the caterpillar to work, either on BB or standalone?
 
 
  • Post #215
  • Quote
  • Aug 26, 2011 10:39am Aug 26, 2011 10:39am
  •  dragosd1
  • | Joined Feb 2008 | Status: Member | 572 Posts
Have not tried Caterpillar with the latest BB versions, but it works standalone. Hint is to select only one direction at a time, BUY or SELL.
I don't say
 
 
  • Post #216
  • Quote
  • Aug 26, 2011 10:42am Aug 26, 2011 10:42am
  •  dragosd1
  • | Joined Feb 2008 | Status: Member | 572 Posts
Quoting ixbone
Disliked
sorry, you accept 50% error rate, wrong signals, no signals?

fyi:
90% metatrader data ist based and calculated on daily high and lows!
99% is based on every tick!

cheers

IX
Ignored
It's ok, mine it's showing good results, with 90% accuracy, so it's not far from reality
I don't say
 
 
  • Post #217
  • Quote
  • Aug 26, 2011 10:46am Aug 26, 2011 10:46am
  •  spyderman
  • Joined Nov 2010 | Status: Snaggin' Some Pips | 2,157 Posts
Quoting dragosd1
Disliked
Have not tried Caterpillar with the latest BB versions, but it works standalone. Hint is to select only one direction at a time, BUY or SELL.
Ignored

Yeah I have set it to long only...or whichever... still can't get it to work. I wonder if an ECN broker makes a difference.
 
 
  • Post #218
  • Quote
  • Aug 26, 2011 10:48am Aug 26, 2011 10:48am
  •  dragosd1
  • | Joined Feb 2008 | Status: Member | 572 Posts
Quoting spyderman
Disliked
Yeah I have set it to long only...or whichever... still can't get it to work. I wonder if an ECN broker makes a difference.
Ignored
No ideea, sorry...btw, as I remember, you have to initiate the 1st position by moving the line(red) to the low of a previous candle...please read the instructions in pdf, anyway, it's better. ;-)
I don't say
 
 
  • Post #219
  • Quote
  • Aug 26, 2011 10:50am Aug 26, 2011 10:50am
  •  spyderman
  • Joined Nov 2010 | Status: Snaggin' Some Pips | 2,157 Posts
Quoting dragosd1
Disliked
No ideea, sorry...btw, as I remember, you have to initiate the 1st position by mving the line(red) to the low of a previous candle...please read the instructions in pdf
Ignored
Ahh so maybe that's my hitch. You have to set the first line. Hmmm. I'll try that. thanks
 
 
  • Post #220
  • Quote
  • Aug 26, 2011 12:35pm Aug 26, 2011 12:35pm
  •  winsteadglenn
  • | Joined Nov 2006 | Status: Member | 330 Posts
Stellar performance today, OOTB. Bravo on the Hopwood/Myers/Osthafen fixes.
 
 
  • Commercial Content
  • /
  • BigBob: Nanningbob V10 auto-trading robot by SteveHopwood
  • Reply to Thread
    • 1 910Page 111213 19
    • 1 10Page 1112 19
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023