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

Pamsy
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4583
Page 2 of 3
Author:  SteveHopwood [ Wed Feb 03, 2016 12:05 am ]
Post subject:  Pamsy

DigitalCrypto » Tue Feb 02, 2016 11:51 pm wrote: @Steve
Do you have a function that can stop trading for the day once a goal has been reached?
Will have tomorrow.

:xm:
Author:  sudhindragk [ Wed Feb 03, 2016 4:51 am ]
Post subject:  Pamsy

DigitalCrypto » Mon Feb 01, 2016 8:28 pm wrote:@Steve,

Still seeing PAM entry line being drawn wrong.

If there is a lower low it shouldn't put a line at all. I couldn't decipher the advanced coding to make heads or tails of it.

Hi David,

was this an issue? or is it resolved?

Regards
Sudhi
Author:  DigitalCrypto [ Wed Feb 03, 2016 6:05 am ]
Post subject:  Pamsy

I think the solution was a simple check to see if the PAM iCandle was the lowest low or highest high. Steve will need to advise on this. I tend to be a cold hearted code breaker when I mess around under the hood....ergo I don't
Author:  nixxx [ Wed Feb 03, 2016 8:20 am ]
Post subject:  Pamsy

Wrong signals + too late?
Author:  SteveHopwood [ Wed Feb 03, 2016 10:41 am ]
Post subject:  Pamsy

V 1b is in post 1.

I have added a new input. DailyProfitTargetPips (in General Inputs) is your daily target per pair in pips. Pamsy will stop trading for the day when this target is hit. It is a blunt instrument in that it uses your broker's D1 candle. This may or may not be related to the trading day.

The buy/sell lines remain on the chart until the next PAM so that the ea knows that the PAM has already been traded. I can have it change colour if it bothers people.

:xm:
Author:  SteveHopwood [ Wed Feb 03, 2016 6:18 pm ]
Post subject:  Pamsy

I forgot to add a call to the chart feedback display function to 1b, so it looks as though the bot has frozen. Fixed in 1c in post 1.

Make your own change by going to line 3525 and replace this code:

Code: Select all

//Have we reached our daily profit target
      ShopShut = HaveWeHitDailyTarget();
      if (ShopShut)
         return;
with

Code: Select all

//Have we reached our daily profit target
      ShopShut = HaveWeHitDailyTarget();
      if (ShopShut)
      {
         DisplayUserFeedback();
         return;
      }//if (ShopShut)
:xm:
Author:  SteveHopwood [ Thu Feb 04, 2016 12:01 am ]
Post subject:  Pamsy

For the minuscule number of people taking a blind bit of notice of their charts, here is the fix for the bloop you have noticed.

Go to line 1728, which should be a blank line and insert:

Code: Select all

if (OrderCloseTime() < iTime(Symbol(), PERIOD_D1, 0) )
         continue;
Can't be arsed to put an update in post 1.
Author:  DigitalCrypto [ Thu Feb 04, 2016 3:48 am ]
Post subject:  Pamsy

Thanks for the updates Steve. I just loaded up the new version and applied the patch.
Author:  SteveHopwood [ Wed Feb 10, 2016 10:05 am ]
Post subject:  Pamsy

V 1d is in post 1. I noticed the chart daily profit display was wrong - a couple of lines of code needed moving outside of a calculation loop.

To make your own change, go to line 3457 and copy this over the top of the existing function:

Code: Select all

bool HaveWeHitDailyTarget()
{

   //Calculate the daily profit so far. Return true if daily target hit, else false
   
   if (OrdersHistoryTotal() == 0)
      return(false);
   
   PipsProfitToday = 0;
      
   for (int cc = OrdersHistoryTotal() - 1; cc >= 0; cc--)
   {
      if (!OrderSelect(cc, SELECT_BY_POS, MODE_HISTORY) ) continue;
      if (OrderMagicNumber() != MagicNumber) continue;
      if (OrderSymbol() != Symbol() ) continue;
      if (OrderCloseTime() < iTime(Symbol(), PERIOD_D1, 0) )
         continue;
      
      double pips = CalculateTradeProfitInPips(OrderType() );
      PipsProfitToday+= pips;
     
         
   }//for (int cc = OrdersHistoryTotal() - 1; cc >= 0; cc--)
   
   if (PipsProfitToday >= DailyProfitTargetPips)
      return(true);
   
   //Got this far, so target not hit yet
   return(false);


}//End bool HaveWeHitDailyTarget()
If you are more confident with making tiny changes you will see in your current version these two lines inside the calculation loop:

Code: Select all

if (PipsProfitToday >= DailyProfitTargetPips)
      return(true);
They need to be the first code block outside of the loop.


:xm:
Author:  DNTme [ Tue Mar 22, 2016 10:11 am ]
Post subject:  Pamsy

I just love this EA ......ok, maybe im too excited and its my first day with it..but i love its logic and also trading with SL and TP... :hi:

So far...today: 7 trades on EA ECAD GCAD GA

will update from time to time! thanks Steve :good:
All times are UTC Page 2 of 3