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

AllPairTradeManager(APTM)
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3482
Page 25 of 65
Author:  milanese [ Wed Apr 29, 2015 3:35 pm ]
Post subject:  AllPairTradeManager(APTM)

Aimak » Wed Apr 29, 2015 3:24 pm wrote:Hi Tommaso,

I love your APTM. It's a great tool that I use for my manual trading.

However I noticed that APTM and Grafenwalder (latest version: orlando) are fighting each other continuously changing SL values. I have APTM set to not trade all open trades and enabled by magic=0. As far I understand only manual trades have magic=0. Still APTM manages all open trades.

I managed to control APTM activity by also enabling Manage by Comment set to NULL. However I would like in the future to set APTM to manage trades open by different EA (different magic numbers) and manual trades. How can I do this? Thanks.

Regards,
Fernando
Important is first to set ManageAllOpenTrades=false than you can set ManageByMagicNumber=true
and with MagicNumber select the magic number you wish the EA to manage.
Note many EA's are using too magic number 0, like HGB ecc.. and, second not you should avoid to mix manual trading and EA trading on one account, as this can allways lead to some inaspected problems..

Cheers :)

Tommaso
Author:  milanese [ Sat May 02, 2015 4:59 pm ]
Post subject:  [bugfix] AllPairTradeManager(APTM)

update version 2.19
may 2th 2015
fixes problems with some settings and pending orders, that caused the EA to stop working
after hitting the CloseALL button.
As always you find the build 219 attached at the first post.

Cheers :)

Tommaso
Author:  viltsu [ Fri May 08, 2015 6:22 am ]
Post subject:  AllPairTradeManager(APTM)

Hello and thanks for this trade manager!

I've been reading code but I just don't get why sometimes manager calculates SL and TP right and sometimes wrong. I did bunch of trades this morning using ATR 5M SL with factor 1 and TP ATR 5M with factor 2.

This morning's trade here:
Capture.PNG

As you can see the SL is much higher than TP, but I don't understand why. Usually it calculates everything fine but sometimes something like this happens.
Author:  milanese [ Fri May 08, 2015 6:39 am ]
Post subject:  AllPairTradeManager(APTM)

viltsu » Fri May 08, 2015 6:22 am wrote:Hello and thanks for this trade manager!

I've been reading code but I just don't get why sometimes manager calculates SL and TP right and sometimes wrong. I did bunch of trades this morning using ATR 5M SL with factor 1 and TP ATR 5M with factor 2.

This morning's trade here:



As you can see the SL is much higher than TP, but I don't understand why. Usually it calculates everything fine but sometimes something like this happens.
first of all please attach your pictures always here, as we don't like that type of links out side...
If you don't know how read there ---click---> http://www.stevehopwoodforex.com/phpBB3/kb.php?a=2

About your question if there is no possibility for setting a SL with the min needed distance, APTM selects an SL that is a type of emergency SL using for this a defined distance. In your case the ATR result will give with your selected multiplicator a SL value that probably is to tight for the brokers STOPLEVEL....
If you activate alerts APTM will alert you in such cases, this code is for avoiding in every case errors added.

Cheers :)

Tommaso
Author:  viltsu [ Fri May 08, 2015 6:44 am ]
Post subject:  AllPairTradeManager(APTM)

milanese » Fri May 08, 2015 9:39 am wrote:
viltsu » Fri May 08, 2015 6:22 am wrote:Hello and thanks for this trade manager!

I've been reading code but I just don't get why sometimes manager calculates SL and TP right and sometimes wrong. I did bunch of trades this morning using ATR 5M SL with factor 1 and TP ATR 5M with factor 2.

This morning's trade here:



As you can see the SL is much higher than TP, but I don't understand why. Usually it calculates everything fine but sometimes something like this happens.
first of all please attach your pictures always here, as we don't like that type of links out side...
If you don't know how read there ---click---> http://www.stevehopwoodforex.com/phpBB3/kb.php?a=2

About your question if there is no possibility for setting a SL with the min needed distance, APTM selects an SL that is a type of emergency SL using for this a defined distance. In your case the ATR result will give with your selected multiplicator a SL value that probably is to tight for the brokers STOPLEVEL....
If you activate alerts APTM will alert you in such cases, this code is for avoiding in every case errors added.

Cheers :)

Tommaso
I fixed the picture. Thanks for the explanation!
Author:  Over60 [ Fri May 08, 2015 9:59 am ]
Post subject:  AllPairTradeManager(APTM)

Hi Milanese,

If the APTM has been deactivated only by Auto Trading Button switched off, the APTM works further on by alerting in the background unless it has been removed.
Does it is intended?

BTW: Is there a script for multiple sell- and/or buy-orders to place for all open- and incl. placed pending- orders the same SL- and/or TP-price value?
If only buy or TP or whatever is requested, than “0” or true/false should work for the functions not needed.
To avoid misunderstandings, such a script is not requested to use it in conjunction with the APTM (off).

Trade well
Over60
Author:  milanese [ Fri May 08, 2015 10:08 am ]
Post subject:  AllPairTradeManager(APTM)

Over60 » Fri May 08, 2015 9:59 am wrote:Hi Milanese,

If the APTM has been deactivated only by Auto Trading Button switched off, the APTM works further on by alerting in the background unless it has been removed.
Does it is intended?

BTW: Is there a script for multiple sell- and/or buy-orders to place for all open- and incl. placed pending- orders the same SL- and/or TP-price value?
If only buy or TP or whatever is requested, than “0” or true/false should work for the functions not needed.
To avoid misunderstandings, such a script is not requested to use it in conjunction with the APTM (off).

Trade well
Over60
yes every EA will do so it is an Empty4 problem, as the button not stops the EA in running but only makes impossible to do trade actions, sure that could be resolved in different ways, the easiest one would be a deactivate button fo the APTM, if this would be asked I will add something like this with the next update..
about the script, I have not seen such a script so far..

Cheers :)

Tommaso
Author:  traderduke [ Sat May 16, 2015 9:04 pm ]
Post subject:  AllPairTradeManager(APTM)

Tommaso
I am hoping you can incorporate this TS into your outstanding APTM. I use this TS for manual renko trading in tradestation hence its in Easy Language. If you would rather not combine it with APTM then could it be a stand alone script or EA? I know I used a curse work ( renko ).

see attached code, not sure if I should put between code or .....

Thanks you for all your helpful contributions and consideration.

Ray

Code: Select all

 Easy Language code

inputs;
RenkoTS2 (true),         //  Get the renko brick size ( bar size ) on the second bar of the chart
NumBarsTrail2( 1 ) ,     // use 1.0 to 3.5 = # of bricks -- allows for skipping 1st or 2nd reversal	 

New Trailing Stop for REnko, see bottom
 
{new Renko Trailing Stop 5-11-2015}

if RenkoTS2 then begin
  if CurrentBar = 2 then  
	RenkoBrickSize =  Boxsize;
	 
  if MarketPosition <> 0 then begin //and TrailingStop = 0 then   
    TStop = EntryPrice - ( MarketPosition * NumBarsTrail2 * RenkoBrickSize );  
  	end;
 
   if MarketPosition = 1 then begin 
      TStop = MaxList( TStop, High - ( NumBarsTrail2 * RenkoBrickSize ) ) ; 	//change to use High    	
      sell ("RTS1-LX2") next bar at TStop stop ; 
      TLID = TL_New(Date, Time, TStop, Date[1], Time[1], TStop ) ; 
      TL_SetSize(TLID, 2 ) ; 
   end 
   else if MarketPosition = -1 then begin
      TStop = MinList( TStop, Low + ( NumBarsTrail2 * RenkoBrickSize ) ) ; 		//change to use Low          	
      buyToCover ("RTS1-SX2") Next bar at TStop stop;
      TLID = TL_New(Date, Time, TStop, Date[1], Time[1], TStop ) ; 
      TL_SetSize(TLID, 2 ) ; 
   end;
   if MP[1] <> 0 and MP = 0 then begin 
	TStop = 0 ;  	  
	end ;     
end;

 
Author:  Aussiedoc [ Sun May 17, 2015 6:18 am ]
Post subject:  AllPairTradeManager(APTM)

Over60 » Fri May 08, 2015 7:59 pm wrote:
BTW: Is there a script for multiple sell- and/or buy-orders to place for all open- and incl. placed pending- orders the same SL- and/or TP-price value?
Trade well
Over60
Hi! Is this any good??

Cheers
Doc :)
Author:  Over60 [ Tue May 19, 2015 5:56 am ]
Post subject:  AllPairTradeManager(APTM)

Hi Doc,

Thanks for sharing the Ducks-EA.

I tried the EA, but somethings does not run correctly.

Refering: “Notes: A manual trade entry EA with a buy and sell button.”

I assume, that the EA, which seems to be button driven needs in addition the following include files, which are not contained in my library folder.

#include <GeneralLibrary.mqh>
#include <LibOrderReliable4.mqh>

I´m not a coder, so maybe you can lead me to the point.

Trade well
Over60
All times are UTC Page 25 of 65