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

Bob and Shelley Again
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=2759
Page 39 of 120
Author:  SteveHopwood [ Thu Oct 03, 2013 12:44 pm ]
Post subject:  Re: Bob and Shelley Again

I think I have found the problem. Fix in 2b in post 1.

If you want to save your hard coded inputs, copy the whole of this:

Code: Select all

double CalculateTakeProfit(int type, double price)
{
   //Returns the take profit for use in LookForTradingOpps and InsertMissingStopLoss
   double take;
   double lp = 0;
   RefreshRates();
   
   if (ObjectFind(tpline) > -1)
   {
      lp = ObjectGet(tpline, OBJPROP_PRICE1);
   }//if (ObjectFind(tpline) > -1)
   
   
   if (type == OP_BUY)
   {
      if (!CloseEnough(TakeProfit, 0) )
      {
         take = price + (TakeProfit / factor);
         HiddenTakeProfit = take;
      }//if (!CloseEnough(TakeProfit, 0) )
      
      //TP at the stack tp line if stacking is being used
      if (!CloseEnough(lp, 0)) take = lp;

               
      if (HiddenPips > 0 && take > 0) take = NormalizeDouble(take + (HiddenPips / factor), Digits);

   }//if (type == OP_BUY)
   
   if (type == OP_SELL)
   {
      if (!CloseEnough(TakeProfit, 0) )
      {
         take = price - (TakeProfit / factor);
         HiddenTakeProfit = take;         
      }//if (!CloseEnough(TakeProfit, 0) )
      
      //TP at the stack tp line if stacking is being used
      if (!CloseEnough(lp, 0)) take = lp;
      
      if (HiddenPips > 0 && take > 0) take = NormalizeDouble(take - (HiddenPips / factor), Digits);

   }//if (type == OP_SELL)
   
   return(take);
   
}//End double CalculateTakeProfit(int type)
over the top of the existing function and recompile.

:D
Author:  Mourad [ Thu Oct 03, 2013 2:45 pm ]
Post subject:  Re: Bob and Shelley Again

OK. Now I know how users feel when they [what do you call it in English?] get punked!!

And what is a dimwit? I don't know what does it mean, but I guess it's supposed to be a harsh word! [language and cultural difference are smoothing insults].

And I assure you Mr Steve that I read the whole thread twice and also the user guide, but looks like it doesn't mean that I fully understand everything! :D
All I want to say is I really appreciate your efforts [thinking, coding and writing] even if I'm a dimwit!!!
And I think you are all well educated guys (the kind of education that we don't get in our countries). So if you all think I'm a (dimwit) then you might be 60% right.

Anyway, No more stupid comments from me. I'll just watch [Unless I got nuked because of this comment]

Mourad
Author:  zTB [ Thu Oct 03, 2013 3:18 pm ]
Post subject:  Re: Bob and Shelley Again

Mourad wrote:OK. Now I know how users feel when they [what do you call it in English?] get punked!!

And what the is a dimwit? I don't know what does it mean, but I guess it's supposed to be a harsh word! [language and cultural difference are smoothing insults].

And I assure you Mr Steve that I read the whole thread twice and also the user guide, but looks like it doesn't mean that I fully understand everything! :D
All I want to say is I really appreciate your efforts [thinking, coding and writing] even if I'm a dimwit!!!

Anyway, No more stupid comments from me. I'll just watch [Unless I got nuked because of this comment]

Mourad


Syed Mourad,

The likelihood of you being 'nuked' is ZERO.

And just like I am absolutely certain your 'offending' post contained no disagreement with, or dissent against, or challenge to, any "exceptionally clever and talented" contributor ; I am also certain Mr. Hopwood bore no ill will when he wrote to reprimand you. If you read his many, many, posts you will find he uses equally harsh words for himself.

However, people from all over the world communicate here. One just needs to write more carefully, and also read more carefully.

Z
Author:  matrixebiz [ Thu Oct 03, 2013 9:44 pm ]
Post subject:  Re: Bob and Shelley Again

Hay All, I know it's kind of early to know for sure but I was wondering what you guys thought were the good pairs to trade this EA on? I've attached a pic showing what pairs I'm trading over the past few weeks and the outcome isn't the best. FYI - these are only re-entry and stack trades, no main trades are being placed, maybe the issue why?
Author:  FXTrucker [ Fri Oct 04, 2013 1:18 am ]
Post subject:  Re: Bob and Shelley Again

SteveHopwood wrote:
fxozgirl wrote:Steve...

I have had v2a running since this morning and getting the following errors:
basa_errors_v2a_131003.png
It's a bit weird, because the errors are not being reported for every trade...5 trades are not producing an error & 4 trades are (# 32851, 45677, 49137 & 50391)
basa_trades_131003.png
Looking at the EU buy trade, some part of the TP calculation function is producing a TP that is below the market and so not allowed. I will look into this - it is probably LUC inviting his buddies around for a coffee.

:D
By the way that is the same thing I was seeing on my simple bob demo of the latest version
Author:  fxdaytrader [ Fri Oct 04, 2013 6:38 am ]
Post subject:  Re: Bob and Shelley Again - BASA multipair

I think I have found one more little bloop in CalculateStopLoss()

The logics is as follows:

Code: Select all

 if (type == OP_BUY)
   {      
      if (!CloseEnough(StopLoss, 0) ) 
      {
         if (OpenTrades == 0) stop = xyz
          else stop = STACKstuff
The problem is, the function is called by insertstoploss() also. And of course, we do have at least 1 trade open then. So to make sure we treat the right trades, I suggest to have a look to the ordercomment().

for example (or look to the calculatestoploss()-function in the multipair-ea attached):

Code: Select all

   if (type == OP_BUY)
   {      
      if (!CloseEnough(StopLoss, 0) ) 
      {
         if (OpenTrades == 0 || OrderComment()!=StackTradeComment) //fxdaytrader (test), added || OrderOpenprice(), we have to know whether this is an already open trade or not ... //old: || OrderOpenPrice()!=0.00000000) 
          {
           stop = price - (StopLoss / factor);
          }
         else if (OrderComment()==StackTradeComment) //fxdaytrader, for stacktrades only!
         {
            stop = NormalizeDouble(price - ((StopLoss / StackStopLossDivisor) / factor), MarketInfo(CurrentPair,MODE_DIGITS));
         }//else 

Then we should change also

Code: Select all

   if (MainTradeComment == "") MainTradeComment = " ";
   if (ReEntryTradeComment == "") ReEntryTradeComment = " ";
   if (StackTradeComment == "") StackTradeComment = " ";
to

Code: Select all

   if (MainTradeComment == "") MainTradeComment = "BASA main";
   if (ReEntryTradeComment == "") ReEntryTradeComment = "BASA re-entry";
   if (StackTradeComment == "") StackTradeComment = "BASA stack";
I just spotted this because last evening I had a coffee and was thinking about Basa - how nice it would be to had a multipair version of it.
The main problem is to know which pair has what kind of trades open, line drawings, and so on.
My idea was to make the line-stuff obsolet and use globalvariables :idea:

This seems to have legs. I think there are still bloops ( :mrgreen: ), but I have attached the version so if you like, improve it (and share it here). The multipair-functions are taken from multi nb 10.4 by Mr. Andrew West (I think it is MrLong ?), credits inside the sourcecode.

Please have a look to my notes at the beginning of the sourcecode, ...

Now I'll try to sleep, tired a bit now ... 8-)
Author:  theforexedge [ Fri Oct 04, 2013 7:41 am ]
Post subject:  Re: Bob and Shelley Again

matrixebiz wrote:Hay All, I know it's kind of early to know for sure but I was wondering what you guys thought were the good pairs to trade this EA on? I've attached a pic showing what pairs I'm trading over the past few weeks and the outcome isn't the best. FYI - these are only re-entry and stack trades, no main trades are being placed, maybe the issue why?
materixebiz

can you share the history indicator in your post, as its really useful to analyse the trades / pairs etc.

thanks, jp
Author:  kwanann [ Fri Oct 04, 2013 8:10 am ]
Post subject:  Re: Bob and Shelley Again - BASA multipair

fxdaytrader wrote: I just spotted this because last evening I had a coffee and was thinking about Basa - how nice it would be to had a multipair version of it.
This is probably for Steve, or you if you have the time, since Steve already has a shell code, is it possible to adapt that shell code to handle multipair? makes it a whole lot easier than opening all the charts and sticking the EA one by one

Just thinking out loud :lol:
Author:  matrixebiz [ Fri Oct 04, 2013 11:28 am ]
Post subject:  Re: Bob and Shelley Again

I've had some requests for the history indicator used above so here it is.
It is a modification I did of iHistory and iExposure merged. Enjoy :)
Author:  SteveHopwood [ Sat Oct 05, 2013 8:10 am ]
Post subject:  Re: Bob and Shelley Again

Shelley, on my experiences this week it looks as though applying Dave's filter at any stage of the evolution to a single Main/Re-entry trade might be a good idea.

So, we have the initial trade. The trading candle moves in the right direction until it closes. Then the next two move in the wrong direction and the third in the sequence (fourth from the trading candle) takes out the SL. Dave's filter never kicks in because the first candle is ok.

Do you have time to look at this and see if you can draw some firm conclusions? Or Dave, have you already done so and concluded that it does not matter because a sufficient number of trades in this position will recover?

Over to you guys.

:D

PS I put this in the wrong thread originally - it was supposed to go here.
All times are UTC Page 39 of 120