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

Fractalated Bob
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3808
Page 24 of 60
Author:  jlcgarcia [ Mon Sep 22, 2014 5:52 am ]
Post subject:  Fractalated Bob

Hi,

for those of you who want to use the RiskPercent as the way to calculate the lot size, perhaps this modification will be useful:

Code: Select all

double CalculateLotSize(double price1, double price2)
{
   //Calculate the lot size by risk. Code kindly supplied by jmw1970. Nice one jmw.
   
//   if (price1 == 0 || price2 == 0) return(Lot);//Just in case
   
   double FreeMargin = AccountFreeMargin();
//   double TickValue = MarketInfo(Symbol(),MODE_TICKVALUE) ;
//   double LotStep = MarketInfo(Symbol(),MODE_LOTSTEP);


//   double SLPts = MathAbs(price1 - price2);
//   SLPts/= Point;//No idea why *= factor does not work here, but it doesn't
   
//   double Exposure = SLPts * TickValue; // Exposure based on 1 full lot

//   double AllowedExposure = (FreeMargin * RiskPercent) / 100;
   
//   int TotalSteps = ((AllowedExposure / Exposure) / LotStep);
//   double LotSize = TotalSteps * LotStep;


   double lotstep = MarketInfo(Symbol(), MODE_LOTSTEP);
   int lotPrecision;
   if (lotstep >= 1) lotPrecision = 0;
   else if (lotstep >= 0.1) lotPrecision = 1;
   else if (lotstep >= 0.01) lotPrecision = 2;
   else lotPrecision = 3;
   
   double LotSize = NormalizeDouble(FreeMargin / 10000 * RiskPercent, lotPrecision);
   

   double MinLots = MarketInfo(Symbol(), MODE_MINLOT);
   double MaxLots = MarketInfo(Symbol(), MODE_MAXLOT);
   
   if (LotSize < MinLots) LotSize = MinLots;
   if (LotSize > MaxLots) LotSize = MaxLots;
   return(LotSize);

}//double CalculateLotSize(double price1, double price1)

Regards


José Luis
Author:  SteveHopwood [ Mon Sep 22, 2014 7:28 am ]
Post subject:  Fractalated Bob

SpiderX » Mon Sep 22, 2014 12:48 am wrote:Hi,

Would just like to mention...if you are looking at this...you would need to consider that the signal candle is 2 candles AFTER the last fractal of the sequence.
My recommendation is to set the pending based on this candle at either the high or the low with a bit of filter, or even at the next 00 level.
Currently, i have a modified version of Fbob running with pending and expiry set as 1 hour.
Will see what happens.

Cheers
Great, spi. Yhanks. I will do nothing until you come to some conclusions.

:xm:
Author:  SteveHopwood [ Mon Sep 22, 2014 8:01 am ]
Post subject:  Fractalated Bob

jlcgarcia » Mon Sep 22, 2014 5:52 am wrote:Hi,

for those of you who want to use the RiskPercent as the way to calculate the lot size, perhaps this modification will be useful:

Code: Select all

double CalculateLotSize(double price1, double price2)
{
   //Calculate the lot size by risk. Code kindly supplied by jmw1970. Nice one jmw.
   
//   if (price1 == 0 || price2 == 0) return(Lot);//Just in case
   
   double FreeMargin = AccountFreeMargin();
//   double TickValue = MarketInfo(Symbol(),MODE_TICKVALUE) ;
//   double LotStep = MarketInfo(Symbol(),MODE_LOTSTEP);


//   double SLPts = MathAbs(price1 - price2);
//   SLPts/= Point;//No idea why *= factor does not work here, but it doesn't
   
//   double Exposure = SLPts * TickValue; // Exposure based on 1 full lot

//   double AllowedExposure = (FreeMargin * RiskPercent) / 100;
   
//   int TotalSteps = ((AllowedExposure / Exposure) / LotStep);
//   double LotSize = TotalSteps * LotStep;


   double lotstep = MarketInfo(Symbol(), MODE_LOTSTEP);
   int lotPrecision;
   if (lotstep >= 1) lotPrecision = 0;
   else if (lotstep >= 0.1) lotPrecision = 1;
   else if (lotstep >= 0.01) lotPrecision = 2;
   else lotPrecision = 3;
   
   double LotSize = NormalizeDouble(FreeMargin / 10000 * RiskPercent, lotPrecision);
   

   double MinLots = MarketInfo(Symbol(), MODE_MINLOT);
   double MaxLots = MarketInfo(Symbol(), MODE_MAXLOT);
   
   if (LotSize < MinLots) LotSize = MinLots;
   if (LotSize > MaxLots) LotSize = MaxLots;
   return(LotSize);

}//double CalculateLotSize(double price1, double price1)

Regards


José Luis
Many thanks José Luis - much appreciated. Much clearer than the original. I shall include this in the next update. Nothing for non-coders to bother about here guys - you will not notice any difference.

:xm:
Author:  AnotherBrian [ Tue Sep 23, 2014 2:29 am ]
Post subject:  Fractalated Bob

jlcgarcia » Mon Sep 22, 2014 12:52 am wrote:Hi,

for those of you who want to use the RiskPercent as the way to calculate the lot size, perhaps this modification will be useful:

Code: Select all

double CalculateLotSize(double price1, double price2)
{
   //Calculate the lot size by risk. Code kindly supplied by jmw1970. Nice one jmw.
   
//   if (price1 == 0 || price2 == 0) return(Lot);//Just in case
   
   double FreeMargin = AccountFreeMargin();
//   double TickValue = MarketInfo(Symbol(),MODE_TICKVALUE) ;
//   double LotStep = MarketInfo(Symbol(),MODE_LOTSTEP);


//   double SLPts = MathAbs(price1 - price2);
//   SLPts/= Point;//No idea why *= factor does not work here, but it doesn't
   
//   double Exposure = SLPts * TickValue; // Exposure based on 1 full lot

//   double AllowedExposure = (FreeMargin * RiskPercent) / 100;
   
//   int TotalSteps = ((AllowedExposure / Exposure) / LotStep);
//   double LotSize = TotalSteps * LotStep;


   double lotstep = MarketInfo(Symbol(), MODE_LOTSTEP);
   int lotPrecision;
   if (lotstep >= 1) lotPrecision = 0;
   else if (lotstep >= 0.1) lotPrecision = 1;
   else if (lotstep >= 0.01) lotPrecision = 2;
   else lotPrecision = 3;
   
   double LotSize = NormalizeDouble(FreeMargin / 10000 * RiskPercent, lotPrecision);
   

   double MinLots = MarketInfo(Symbol(), MODE_MINLOT);
   double MaxLots = MarketInfo(Symbol(), MODE_MAXLOT);
   
   if (LotSize < MinLots) LotSize = MinLots;
   if (LotSize > MaxLots) LotSize = MaxLots;
   return(LotSize);

}//double CalculateLotSize(double price1, double price1)

Regards


José Luis
The formulas doesn't use "tickvalue" (it's commented out), so does that mean we will get the same lot size for all pairs, which means some will actually carry more (or Less) risk than intended?
Author:  vadlapatis [ Wed Sep 24, 2014 4:31 pm ]
Post subject:  Fractalated Bob

Hi all

after long time im back to FX

let try this Stunning BOT

10nq u Steve for fantastic FBOB
Author:  patmontes [ Thu Sep 25, 2014 1:22 pm ]
Post subject:  Fractalated Bob

I'm also have this running on one pair USDCHF on a very small account trying how much can it make it profit...
The answer? Excellent!!! See my signature :hi:
Author:  excalibre30 [ Thu Sep 25, 2014 1:42 pm ]
Post subject:  Fractalated Bob

patmontes » Thu Sep 25, 2014 9:22 pm wrote:I'm also have this running on one pair USDCHF on a very small account trying how much can it make it profit...
The answer? Excellent!!! See my signature :hi:
Hi Pat,

What's the tf of the usdchf pair and setting for profit taking and sl?
Author:  patmontes [ Thu Sep 25, 2014 2:27 pm ]
Post subject:  Fractalated Bob

excalibre30 » Thu Sep 25, 2014 1:42 pm wrote:
patmontes » Thu Sep 25, 2014 9:22 pm wrote:I'm also have this running on one pair USDCHF on a very small account trying how much can it make it profit...
The answer? Excellent!!! See my signature :hi:
Hi Pat,

What's the tf of the usdchf pair and setting for profit taking and sl?
15min TF 20 pip distance from sma 10/20 pip distance from profit/loss trades. Close at 1.3 cash profit I think.
Author:  patmontes [ Thu Sep 25, 2014 2:45 pm ]
Post subject:  Fractalated Bob

My JPY pairs crashed... small balance of 300 can't hold much for 7pair trading...good thing it's demo.. and lesson learned in knowing how much can a small account handle. :smile:
Author:  boldtrader [ Thu Sep 25, 2014 3:59 pm ]
Post subject:  Fractalated Bob

FB doing well here..

+2.6% in 7 trading days on 26 pairs.

Thank Bob and Steve.
All times are UTC Page 24 of 60