Bob and Shelley Again

Locked
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Bob and Shelley Again

Post by SteveHopwood »

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
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Mourad

Re: Bob and Shelley Again

Post by Mourad »

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
Last edited by Mourad on Thu Oct 03, 2013 3:31 pm, edited 1 time in total.
zTB
Trader
Posts: 75
Joined: Sat Mar 16, 2013 9:45 am

Re: Bob and Shelley Again

Post by zTB »

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
matrixebiz
Trader
Posts: 70
Joined: Wed Nov 16, 2011 4:39 am

Re: Bob and Shelley Again

Post by matrixebiz »

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?
You do not have the required permissions to view the files attached to this post.
FXTrucker
Trader
Posts: 45
Joined: Wed Dec 07, 2011 4:26 am

Re: Bob and Shelley Again

Post by FXTrucker »

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
There are 10 kinds of people who understand binary. Those who do and those who don't.
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: Bob and Shelley Again - BASA multipair

Post by fxdaytrader »

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-)
You do not have the required permissions to view the files attached to this post.
theforexedge
Trader
Posts: 220
Joined: Thu Apr 26, 2012 10:31 pm
Location: Torquay

Re: Bob and Shelley Again

Post by theforexedge »

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
User avatar
kwanann
Trader
Posts: 948
Joined: Thu Nov 29, 2012 1:53 am

Re: Bob and Shelley Again - BASA multipair

Post by kwanann »

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:
I've been trading using OM Dual N EA for the past 2 years, live results can be found over at https://www.fxblue.com/users/kwanann
matrixebiz
Trader
Posts: 70
Joined: Wed Nov 16, 2011 4:39 am

Re: Bob and Shelley Again

Post by matrixebiz »

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 :)
You do not have the required permissions to view the files attached to this post.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Bob and Shelley Again

Post by SteveHopwood »

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.
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Locked

Return to “Automated trading systems”