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

swingONE
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=217
Page 5 of 21
Author:  fx800 [ Fri Jan 20, 2012 11:56 am ]
Post subject:  Re: swingONE

markft wrote:
markft wrote:
fx8000 wrote:Hi Mahmut,

Thanks for helping out.

SwingONE 1.9.8 installed to US30 M15 chart. At 18.02 hr gmt, it executed a buy trade, but immediately closed it.

I have attached the EXPERTS log file below and also the SwingONE set file. I forgot to disable the Mptm EA that was use to manage the other currency pairs. MPTM set to breakeven at 30+0, part close enabled with JS at 30. MPTM set file also attached below.

Hi Peter,

Could not see any log files - only a set file for the EA. Was it the MPTM that closed the trade immediately do you think? If you can attach a log that should clarify if there is an issue.

Kind Regards
Mahmut
Hi Mahmut,

Sorry I forgot to upload the experts log file for the closed trade at 18.46 hr gmt yesterday. I seem to remember seeing "context busy" error when the MPTM tried to send sl and tp info. However, after I installed the latest version of the EA, the problem appeared to have been fixed as the EA was sending buy and sell trades normally.

I have installed a new demo after that, and at 6 am today, I turned on the EA, and also installed the MPTM EA. At 6.15 am, the EA sent a long for US30, and the trade was closed almost immediately with the message that the MPTM closed trade because sl hit, which obviously is not the case as the sl was set at 40 0r 50.

I have since disabled the MPTM again, and all is well. Just need to avoid using the MPTM EA, not a big deal.

I have attached the experts log files as requested.

Thanks again for your help.

Best regards,
Peter
Author:  markft [ Fri Jan 20, 2012 12:03 pm ]
Post subject:  Re: swingONE

fx8000 wrote: Hi Mahmut,

Sorry I forgot to upload the experts log file for the closed trade at 18.46 hr gmt yesterday. I seem to remember seeing "context busy" error when the MPTM tried to send sl and tp info. However, after I installed the latest version of the EA, the problem appeared to have been fixed as the EA was sending buy and sell trades normally.

I have installed a new demo after that, and at 6 am today, I turned on the EA, and also installed the MPTM EA. At 6.15 am, the EA sent a long for US30, and the trade was closed almost immediately with the message that the MPTM closed trade because sl hit, which obviously is not the case as the sl was set at 40 0r 50.

I have since disabled the MPTM again, and all is well. Just need to avoid using the MPTM EA, not a big deal.

I have attached the experts log files as requested.

Thanks again for your help.

Best regards,
Peter
Thanks Peter for clarifying. I wanted to see if the immediate close was due to a bug with this EA.

I am guessing MPTM closed it as the SL will always set to 0 for this symbol. You should be able to fix it - just initialise "multiplier" to 1 in the EA init function as in my earlier post.
Author:  fx800 [ Fri Jan 20, 2012 12:19 pm ]
Post subject:  Re: swingONE

markft wrote:
fx8000 wrote: Hi Mahmut,

Sorry I forgot to upload the experts log file for the closed trade at 18.46 hr gmt yesterday. I seem to remember seeing "context busy" error when the MPTM tried to send sl and tp info. However, after I installed the latest version of the EA, the problem appeared to have been fixed as the EA was sending buy and sell trades normally.

I have installed a new demo after that, and at 6 am today, I turned on the EA, and also installed the MPTM EA. At 6.15 am, the EA sent a long for US30, and the trade was closed almost immediately with the message that the MPTM closed trade because sl hit, which obviously is not the case as the sl was set at 40 0r 50.

I have since disabled the MPTM again, and all is well. Just need to avoid using the MPTM EA, not a big deal.

I have attached the experts log files as requested.

Thanks again for your help.

Best regards,
Peter
Thanks Peter for clarifying. I wanted to see if the immediate close was due to a bug with this EA.

I am guessing MPTM closed it as the SL will always set to 0 for this symbol. You should be able to fix it - just initialise "multiplier" to 1 in the EA init function as in my earlier post.

Will try that, Mahmut, and report back over the weekend.

Thanks,
Peter
Author:  markft [ Fri Jan 20, 2012 12:26 pm ]
Post subject:  Re: swingONE

fx8000 wrote:
Will try that, Mahmut, and report back over the weekend.

Thanks,
Peter
Sounds good :)
Author:  fx800 [ Fri Jan 20, 2012 5:13 pm ]
Post subject:  Re: swingONE

markft wrote:
fx8000 wrote:
Will try that, Mahmut, and report back over the weekend.

Thanks,
Peter
Sounds good :)

Hi Mahmut,

I have checked the init code for the swingONE 1.9.8 that I am using at the moment, and found that
that "int multiplier =1 " has already been added.

Code: Select all

[//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
{
//----

   //Adapt to x digit criminals
   int multiplier = 1;
   if(Digits == 2 || Digits == 4) multiplier = 1;
   if(Digits == 3 || Digits == 5) multiplier = 10;
   if(Digits == 6) multiplier = 100;   
   if(Digits == 7) multiplier = 1000;   
   
   if (multiplier > 1) PipDescription = " points";
   
   TakeProfit*= multiplier;
   StopLoss*= multiplier;
   HiddenPips*= multiplier;
   BufferPips*= multiplier;
   MaxSpread *= multiplier;
   
   BreakEvenPips*= multiplier;
   BreakEvenProfit*= multiplier;
   JumpingStopPips*= multiplier;
   TrailingStopPips*= multiplier;/code]

Is there anything more I need to do ?

Cheers,
Peter
Author:  fx800 [ Sat Jan 21, 2012 1:35 am ]
Post subject:  Re: swingONE

Results of demo account on swingONE 1.9.5 from 16th January till close of trading on 19th Jan.

10 pairs : GU, EU, AU, GJ, EJ, AJ, NU, NJ, USDCHF, EURAUD.

H4 charts, trade 24 hrs, OOTB, Hanover D1 slope confirmation candles 2.

Cheers,
Peter
Author:  markft [ Sat Jan 21, 2012 1:37 am ]
Post subject:  Re: swingONE

Hi Peter,
Sorry for the confusion. I meant you can make this change to mptm so it will not immediately close trades. I have already made this change to swingone.
Author:  fx800 [ Sat Jan 21, 2012 1:51 am ]
Post subject:  Re: swingONE

markft wrote:Hi Peter,
Sorry for the confusion. I meant you can make this change to mptm so it will not immediately close trades. I have already made this change to swingone.

Hi Mahmut,

Sorry my mistake !

Will make the change to MPTM and try again next week.

In the meantime, the US30 was trading beautifully yesterday and made me some good pips live on my spread betting account starting from 2 pm onwards. Took only two trades, a long for 40 pips and a short for 5 pips because PA was going no where after 15 minutes.

This little gem spots a reversal pretty early, and at NY open, the momentum for US30 is often good for at least 20 to 30 pips. Great for scalping.

Still not ready to use the bot for live trading yet, not until most of the bugs are hunted down and fixed.

I am enjoying this and thanks for your help.

Cheers and have a nice weekend.

Peter
Author:  SteveHopwood [ Sat Jan 21, 2012 10:46 am ]
Post subject:  Re: swingONE

markft wrote:Thanks Peter for clarifying. I wanted to see if the immediate close was due to a bug with this EA.

I am guessing MPTM closed it as the SL will always set to 0 for this symbol. You should be able to fix it - just initialise "multiplier" to 1 in the EA init function as in my earlier post.
Only browsing here with no real idea what is going on, but you guys should be aware that a fault has emerged in the tp/sl calculations function of my shell code. Khalid used the shell to create the first version of this EA, so the fault could be causing some problems.

double CalculateStopLoss(int type) contains this line of code:

Code: Select all

if (HiddenPips > 0) stop = NormalizeDouble(stop + (HiddenPips * Point), Digits);
If StopLoss = 0 and there is no other sl used (Atr etc) and HiddenPips > 0, this code will result in a stop that is 0 plus the value of HiddenPips, which will probably close out as soon as the trade is sent,

Correct it with

Code: Select all

if (HiddenPips > 0 && stop > 0) stop = NormalizeDouble(stop + (HiddenPips * Point), Digits);
There is a similar correction needed in double CalculateTakeProfit(int type)

Code: Select all

if (HiddenPips > 0 && take > 0) take = NormalizeDouble(take - (HiddenPips * Point), Digits);
:D
Author:  SteveHopwood [ Sat Jan 21, 2012 10:59 am ]
Post subject:  Re: swingONE

Khalaad wrote:Any idea, why why the EA executes two trades simultaneously, rather than one :?:

Khalid
Does this happen every time, or just occasionally?

:D
All times are UTC Page 5 of 21