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

Fmfx auto-trader. Another new toy by Steve Hopwood
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=318
Page 3 of 13
Author:  Fmfx [ Thu Feb 02, 2012 11:10 am ]
Post subject:  Re: Fmfx auto-trader. Another new toy by Steve Hopwood

Hi Steve, it seems the bot is not opening a new trade immediately it close one :?:
Author:  Aussiedoc [ Thu Feb 02, 2012 11:28 am ]
Post subject:  Re: Fmfx auto-trader. Another new toy by Steve Hopwood

webregs wrote: I've just fired it up myself but I'm getting "..order send failed with error(130: invalid stops" erros on BUY and Sell orders. I'm using the EA OOTB so CriminalIsECN=false. My demo trader is AxiTrader.
Axitrader -- CriminalECN=True

Cheers
Author:  Aussiedoc [ Thu Feb 02, 2012 3:57 pm ]
Post subject:  Re: Fmfx auto-trader. Another new toy by Steve Hopwood

Morning all!

Can anyone head me in the right direction, please?

Have loaded FMFX EA onto two different platforms now with similar results. Latest - Axis demo with ootb settings + 1 change. CriminalECN=True. All other pairs so far working fine except USDCAD & USDCHF. Both opening continual trades sell trades that close out within seconds at 1-2 pip losses. Made no difference if CriminalECN=False. Only way to stop is to load different template.

Got me completely stumped!

Thanks.
Author:  Fmfx [ Thu Feb 02, 2012 4:07 pm ]
Post subject:  Re: Fmfx auto-trader. Another new toy by Steve Hopwood

Aussiedoc wrote:Morning all!

Can anyone head me in the right direction, please?

Have loaded FMFX EA onto two platforms now with similar results. Latest - Axis demo with ootb settings + 1 change. CriminalECN=True. All other pairs so far working fine except USDCAD & USDCHF. Both opening continual trades sell trades that close out within seconds at 1-2 pip losses. Made no difference if CriminalECN=False. Only way to stop is to load different template.

Got me completely stumped!

Thanks.
Hello

I am also having same problem, maybe steve can help us take a look at the code.
Author:  SteveHopwood [ Thu Feb 02, 2012 5:47 pm ]
Post subject:  Re: Fmfx auto-trader. Another new toy by Steve Hopwood

Latest update in post 1. Looking through the code brought to light a couple of minor bugs - nothing substantial.

I have added a new input - SendAlertNotTrade. If set to true, this will cause the robot to show and sound a chart alert, and send you an email if you have this set up. It will not send the trade. Is is for those of you with a healthy mistrust of alliance between EA's and Empty4.

Fmfx, those trades you feature in your first pic are marginal at best. Sometimes psar is obscured; sometimes the force index is so close to the zero line that you cannot know what the value was at the time the arrow appeared. What you see historically is a fixed point, but this point is only fixed on the open or the next candle. For buy trades, FI must be > 0; if it is =0 or <0 by even a tiny amount then the bot will not trade.

Your second pic is wrong. Psar is below the market, so the bot cannot sell. My comments in the previous para about FI also apply.

As to the rapid appearance/then closure of trades, is everyone testing the EA on a clean demo that is not hosting other EA's? One of my fav trick is to have an EA running that detects a trade with a zero magic number that meets its closure requirements, and so it closes the trade; then, the EA for whom the trade conditions are met obediently discovers there is no open trade and sends one. Which the other EA......................................

Just check, and add some magic numbers if you are testing multiple EA's. I can see nothing in the code to cause this - doesn't mean there is nothing, but I cannot find it for now.

:D
Author:  SteveHopwood [ Thu Feb 02, 2012 7:39 pm ]
Post subject:  Re: Fmfx auto-trader. Another new toy by Steve Hopwood

I had another trade close fail tonight, following a change of arrow direction, so I had a look and found that I had left a mistake in the selection of the most recent open trade. This is fixed in the post 1 update.

Those of you who can, save yourselves a re-download by copying this over the top of your existing code (copy it over the whole of bool CloseTrade(int ticket):

Code: Select all

bool CloseTrade(int ticket)
{   
   while(IsTradeContextBusy()) Sleep(100);
   if (!OrderSelect(ticket, SELECT_BY_TICKET) ) return(true);
   
   bool result = OrderClose(ticket, OrderLots(), OrderClosePrice(), 1000, CLR_NONE);


   //Actions when trade send succeeds
   if (result)
   {
      return(true);
   }//if (result)
   
   //Actions when trade send fails
   if (!result)
   {
      int err=GetLastError();
      
      Alert(OrderTicket()," Order Close failed with error(",err,"): ",ErrorDescription(err));
      return(false);
   }//if (!result)
   

}//End bool CloseTrade(ticket)

Also, go to void CountOpenTrades() and copy this to the very end of the function will be the only trade, just above
}//End void CountOpenTrades();

Code: Select all

      //Reselect the most recent trade. If Recovery/hedging/caterpillar are not being used, this will be the only trade
   if (TicketNo > -1) OrderSelect(TicketNo, SELECT_BY_TICKET, MODE_TRADES);

:D
Author:  MiTija [ Thu Feb 02, 2012 7:47 pm ]
Post subject:  Re: Fmfx auto-trader. Another new toy by Steve Hopwood

SteveHopwood wrote:Latest update in post 1. Looking through the code brought to light a couple of minor bugs - nothing substantial.

<snip>

As to the rapid appearance/then closure of trades, is everyone testing the EA on a clean demo that is not hosting other EA's? One of my fav trick is to have an EA running that detects a trade with a zero magic number that meets its closure requirements, and so it closes the trade; then, the EA for whom the trade conditions are met obediently discovers there is no open trade and sends one. Which the other EA......................................

Just check, and add some magic numbers if you are testing multiple EA's. I can see nothing in the code to cause this - doesn't mean there is nothing, but I cannot find it for now.

:D
Hi Steve,

I test new EAs on a squeaky clean setup. I start with snapshot of a newly installed Win XP SP3 that I keep in VMware with a fresh installed Empty4 along with 12G of pair history (down to tick level) from Jan 1, 2004 thru Dec 31, 2011. There is no other software installed on the VM (Virtual Machine) or Empty4.

When I get home tonight I will give the most recent version a spin. If the rapid closure anomaly still occurs on my setup, I will post a cut / paste some of the result logs from the strategy tester. It may help. It may not. Only time will tell.

Thanks for all your efforts on this EA.

Best Regards,


MiTija
Author:  Fmfx [ Thu Feb 02, 2012 8:00 pm ]
Post subject:  Re: Fmfx auto-trader. Another new toy by Steve Hopwood

Thanks Steve for the great efforts. I shall set up a new demo acc for the updated version.

Thanks :D
Author:  GT3RS [ Thu Feb 02, 2012 8:20 pm ]
Post subject:  Re: Fmfx auto-trader. Another new toy by Steve Hopwood

I have VERY little experience with bots, but I hope to learn from you guys!!!

Loaded up on demo account!!

:mrgreen: :mrgreen: :mrgreen:
Author:  harryA [ Thu Feb 02, 2012 11:59 pm ]
Post subject:  Re: Fmfx auto-trader. Another new toy by Steve Hopwood

SteveHopwood wrote:Latest update in post 1. Looking through the code brought to light a couple of minor bugs - nothing substantial.

I have added a new input - SendAlertNotTrade. If set to true, this will cause the robot to show and sound a chart alert, and send you an email if you have this set up. It will not send the trade. Is is for those of you with a healthy mistrust of alliance between EA's and Empty4.

Fmfx, those trades you feature in your first pic are marginal at best. Sometimes psar is obscured; sometimes the force index is so close to the zero line that you cannot know what the value was at the time the arrow appeared. What you see historically is a fixed point, but this point is only fixed on the open or the next candle. For buy trades, FI must be > 0; if it is =0 or <0 by even a tiny amount then the bot will not trade.

Your second pic is wrong. Psar is below the market, so the bot cannot sell. My comments in the previous para about FI also apply.

As to the rapid appearance/then closure of trades, is everyone testing the EA on a clean demo that is not hosting other EA's? One of my fav trick is to have an EA running that detects a trade with a zero magic number that meets its closure requirements, and so it closes the trade; then, the EA for whom the trade conditions are met obediently discovers there is no open trade and sends one. Which the other EA......................................

Just check, and add some magic numbers if you are testing multiple EA's. I can see nothing in the code to cause this - doesn't mean there is nothing, but I cannot find it for now.

:D

Just a quick look at journal points out to missing sidus_v3 indicator could be one of the cause to close the trade right away, Please include that file along with EA at the front page. I m trying to find it on FF as well. Thanks

[edit]found the indicator and working fine now. Second thing I am getting an repeat modify orderstop error with default setting of jumping stop on backtesting any pair. Anybody else have the same thing in journal? Gonna look at the code later to find what caused it, but you may find it quicker.

19:13:18 2011.05.23 09:22 Fmfx auto-trading EA USDCAD,M15: OrderModify error 1
19:13:18 2011.05.23 09:22 Fmfx auto-trading EA USDCAD,M15: Alert: 3 stop loss modification failed with error(1): no error
19:13:18 2011.05.23 09:22 Fmfx auto-trading EA USDCAD,M15: 3 stop loss modification failed with error(1): no error
19:13:18 2011.05.23 09:22 Fmfx auto-trading EA USDCAD,M15: OrderModify error 1
19:13:18 2011.05.23 09:22 Fmfx auto-trading EA USDCAD,M15: Alert: 3 stop loss modification failed with error(1): no error
19:13:18 2011.05.23 09:22 Fmfx auto-trading EA USDCAD,M15: 3 stop loss modification failed with error(1): no error
19:13:18 2011.05.23 09:22 Fmfx auto-trading EA USDCAD,M15: OrderModify error 1
19:13:18 2011.05.23 09:22 Fmfx auto-trading EA USDCAD,M15: Alert: 3 stop loss modification failed with error(1): no error
All times are UTC Page 3 of 13