Fractalated Bob

EA's inspired by nanningbob's work here, especially those based on his 240 Moving Average trend detection filter.
User avatar
woodlands
Trader
Posts: 226
Joined: Sun Mar 23, 2014 6:16 pm

Fractalated Bob

Post by woodlands »

It seems that your MPTM set file is set all to disabled

Except for the Global Closure at 2%, BE is set in the EA
theforexedge
Trader
Posts: 220
Joined: Thu Apr 26, 2012 10:31 pm
Location: Torquay

Fractalated Bob

Post by theforexedge »

SpiderX » Tue Nov 25, 2014 12:44 am wrote:Hi all,

Steve was kind enough to unlock this thread at my request to share my results on Fractalated Bob.
I have been running two different versions for around 2 months now.
The first is the original version with direct order entry, the second version is modified slightly to enter on pending orders only.
Both versions run on 15m and H1 with MTPM take profit at 2% (? ...cant remember exactly, got to check the vps)
The results are as below.
The equity growth rate on the pending versions are somewhat lesser than the non-pending version.
However, the pending entry version is able to a certain extent avoid the steep draw-down which affects the direct entry.
In short term, it looks like the direct entry version works great, but over a longer term, the pending version is more stable.

Cheers
SpiderX

Can you post the code to do the pending mod or the EA...whatever's easiest :smile:

Thanks, JP
trader689
Trader
Posts: 674
Joined: Thu Nov 17, 2011 12:53 am

Fractalated Bob

Post by trader689 »

woodlands using your settings last couple of days with good results, will report back. only change is in mptm didnt set global closure to 2% but rather fixed cash value to represent 2% of original deposit, otherwise the total needed to close keeps increasing as the balance grows
User avatar
woodlands
Trader
Posts: 226
Joined: Sun Mar 23, 2014 6:16 pm

Fractalated Bob

Post by woodlands »

trader689 » Fri Nov 28, 2014 1:11 pm wrote:woodlands using your settings last couple of days with good results, will report back. only change is in mptm didnt set global closure to 2% but rather fixed cash value to represent 2% of original deposit, otherwise the total needed to close keeps increasing as the balance grows
Do you think that there is a point where the profit level suits the size of account? I have increased the lot size pro rata, manually, with the account growth and left the 2% in place to try and maintain that relationship and compound the profit.
trader689
Trader
Posts: 674
Joined: Thu Nov 17, 2011 12:53 am

Fractalated Bob

Post by trader689 »

theres probably an argument to be made for that, but if im autotrading i just dont want to personally delve in to that degree and make adjustments on the fly continuously

what i usually would do is say hit a round number in balance size, eg start at £2k and hit £3k, then recalculate and increase lot size to match the new 2% figure

woodlands » Fri Nov 28, 2014 5:46 pm wrote:
trader689 » Fri Nov 28, 2014 1:11 pm wrote:woodlands using your settings last couple of days with good results, will report back. only change is in mptm didnt set global closure to 2% but rather fixed cash value to represent 2% of original deposit, otherwise the total needed to close keeps increasing as the balance grows
Do you think that there is a point where the profit level suits the size of account? I have increased the lot size pro rata, manually, with the account growth and left the 2% in place to try and maintain that relationship and compound the profit.
User avatar
patmontes
Trader
Posts: 367
Joined: Wed Apr 23, 2014 10:42 pm

Fractalated Bob

Post by patmontes »

Since i switched to the stoch version of FBob it has been steady upward growth. Link in the signature :good:

I thank Steve for reprimanding me with my post earlier and made me think about the filters especially Stochs
AGT
Trader
Posts: 889
Joined: Thu Nov 17, 2011 7:20 pm
Location: Germany

Fractalated Bob

Post by AGT »

The FB + woodland setfile started great and did very well but failed at the end during the last week :uff:
http://www.myfxbook.com/members/TGTFX2/ ... 01/1100092
I used only the limited number of major pairs ... (acc moved into the "archive")
One week another demo acc with v 1i is running:
http://www.myfxbook.com/members/MANDL20 ... tp/1095635
In that case I use 15 pairs, not only the majors ... so far it is doing much better.
And here is another acc, started only at last friday:
http://www.myfxbook.com/members/TGT_FX/ ... ll/1100412

The last two, actual acc's are different: they use not only more pairs, they use MPTM with fixed 20 or 40 EUR TP respectively. The mod. setfile is attached ... time will show what the FB can bring us. :xm:
You do not have the required permissions to view the files attached to this post.
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Fractalated Bob

Post by fxdaytrader »

I have to admit that I am currently playing around with the fractalad bob ea (I assume it is the first version 1) :hi:

While playing around and testing some filters something which I thought about but forgot it came back to my mind:
Why do we (mostly) play around with fixed values eg for breakeven, jumpingstop, moving average periods (or periods of other indicators)? I consider it more clever to choose the periods according to the market behaviour.
Below is a first try (I think you'll notice that I am playing around, hehe), here the HighMaPeriod would be our highest ma (e.g. ma 240). I am testing on tf M15, but the principle should be clear.

just call AdjustStuffByRange(); right after the start() command ...

I think the coders amongst us will understand what I mean and what the vars (eg pips2dbl) mean, so I think it is not necessary to explain them.

Code: Select all

void AdjustStuffByRange() {
 int barslookback      = 2;
 int barslookbackstart = 1;
 if (Period()==PERIOD_M1)  barslookback=1440;//1440 bars = 1 day
 if (Period()==PERIOD_M5)  barslookback=288;//288 bars = 1 day
 if (Period()==PERIOD_M15) barslookback=96;//96 bars = 1 day
 if (Period()==PERIOD_M30) barslookback=48;//48 bars = 1 day
 if (Period()==PERIOD_H1)  barslookback=24;//24 bars = 1 day
 if (Period()==PERIOD_H4)  barslookback=6;//6 bars = 1 day
 
 double lastDHigh = iHigh(Symbol(),0,iHighest(Symbol(),0,MODE_HIGH, barslookback,barslookbackstart));
 double lastDLow  = iLow(Symbol(),0,iLowest(Symbol(),0,  MODE_LOW,  barslookback,barslookbackstart));
 double range = MathAbs(lastDHigh-lastDLow)/pips2dbl;
 
 double fibo1 = 1.618;
 double fibo2 = 3.82;
 double fibo3 = 0.382;
 
 double lowrange = range/fibo1;
 double lowrangeext = (range/fibo1)/fibo2;
 //adjust moving averages:
 HighMaPeriod         = range;
 LowMaPeriod          = lowrange;
 LowMaPeriodExtended  = lowrangeext;
 
 //adjust breakevenpips:
 if (lowrangeext>(BreakEvenProfit+1.0)) BreakEvenPips=lowrangeext;
 
 //adjust jumpingstop pips:
 double jsatrval = (iATR(Symbol(),0,14,1)+iATR(Symbol(),0,34,1)/2.0)/pips2dbl;
 double jspips=(jsatrval+lowrange)*fibo3;
 if (jspips>BreakEvenPips+3.6) JumpingStopPips = jspips;
}
:!!:

(@Steve: I am not sure if somebody else mentioned that idea earlier than me. If so, please excuse me)
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Fractalated Bob

Post by fxdaytrader »

hm, I forgot to mention another suggestion:

Re-Entries are nice to boost profits - but the problem is they can boost your losses the same way :shock:
In most of my eas I am using the following features now:

- check if there are at least int MinBarsBetweenTradesOfSameType = 4; (0:disable // could be implemented as external input) bars of the current TF gone since a) the last orderclose and b) the last entry (for orders of the same ordertype only!)
this is the purpose of the function bool OCTimeLastOrderSameTypeOk

- check if the open trades (of the same ordertype) are at least at BreakEven (BE). It is no guarantee for profits, but imho it does not hurt. the function bool SLLastOrderSameTypeOk should do this (requires the (external) variable bool NewOrderOnlyIfOldIsAtBE=TRUE;)

how to implement these two functions:
insert this:

Code: Select all

    if (!OCTimeLastOrderSameTypeOk(Symbol(),type,MagicNumber)) SendTrade=FALSE;
    if (NewOrderOnlyIfOldIsAtBE && !SLLastOrderSameTypeOk(Symbol(),type,MagicNumber)) SendTrade=FALSE;
right before

Code: Select all

    if (SendTrade)
    {
       if (!SendAlertNotTrade) 
       { 
          result = SendSingleTrade(Symbol(), type, TradeComment, SendLots, price, stop, take);
the two functions:

Code: Select all

//check if bar difference between current time and orderopentime/orderclosetime is >= MinBarsBetweenTradesOfSameType
bool OCTimeLastOrderSameTypeOk(string symbol,int type,int magicnumber) {//fxdaytrader
 if (MinBarsBetweenTradesOfSameType==0) return(true);
//Open Trades:
 for (int cnt=OrdersTotal()-1; cnt>=0; cnt--) {
  if (!OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES)) continue;
  if (OrderSymbol()!=symbol) continue;
  if (OrderMagicNumber()!=magicnumber) continue;
  if (OrderType()!=type) continue;
   {
     if (OrderOpenTime()>=iTime(OrderSymbol(),0,0)) return(false);
     if (TimeCurrent() - OrderOpenTime() < (MinBarsBetweenTradesOfSameType * Period() * 60)) return(false);
   }
 }//for (int cnt=OrdersTotal()-1; cnt>=0; cnt--) {
 
//History
 for (cnt=OrdersHistoryTotal()-1; cnt>=0; cnt--) {
  if (!OrderSelect(cnt,SELECT_BY_POS,MODE_HISTORY)) continue;
  if (OrderSymbol()!=symbol) continue;
  if (OrderMagicNumber()!=magicnumber) continue;
  if (OrderType()!=type) continue;
   {
     if (TimeCurrent() - OrderCloseTime() < (MinBarsBetweenTradesOfSameType * Period() * 60)) return(false);
   }
 }//for (cnt=OrdersHistoryTotal()-1; cnt>=0; cnt--) {
 
return(true);
}

//checks if all open orders are at least at BE
bool SLLastOrderSameTypeOk(string symbol,int type,int magicnumber) {//fxdaytrader
 for (int cnt=OrdersTotal()-1; cnt>=0; cnt--) {
  if (!OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES)) continue;
  if (OrderSymbol()!=symbol) continue;
  if (OrderMagicNumber()!=magicnumber) continue;
   {
     if (OrderType()==type && type==OP_BUY) {
      if (OrderStopLoss()==0||(OrderStopLoss()<OrderOpenPrice())) return(false);
     }//if (OrderType()==type && type==OP_BUY) {
     if (OrderType()==type && type==OP_SELL) {
      if (OrderStopLoss()==0||(OrderStopLoss()>OrderOpenPrice())) return(false);
     }//if (OrderType()==type && type==OP_SELL) {
   }
 }//for (int cnt=OrdersTotal()-1; cnt>=0; cnt--) {
return(true);
}
maybe somebody has a use for it :hi: :good:
User avatar
mobthehop
Trader
Posts: 362
Joined: Wed Nov 16, 2011 12:16 am

Fractalated Bob

Post by mobthehop »

Moin Marc...

Nice of you to share...

Could you please also share the code snippet for "NewOrderOnlyIfOldIsAtBE"check...

Cheers

PS: Hoffe Dir geht es weiterhin gut ....
Post Reply

Return to “Thingy Bob EA's”