Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
MAGIC NUMBERS for 1clicktrades scripts and closeallprofittarget EA
Hello,
I am seeking for such tools (sorry for my poor english) which already exist but in a global and basic trade way only (one pair, one time frame, if not : beware of interferences) :
script : one-click direct buy or sell order with a magic number identification flag (user parameter edit)
EA : close all (market or trailing stop) after specific profit(/loss if negative) in money, or pips, is reached for these magic numbers groups of positions/trades ONLY
purpose : straddle or hedged kind strategies within magic number selectivity for differenciated and independant actions
example :
on EURUSD 1MN :
I open manually and instantly at market price (quantity, slipping, etc. predefined by user modifying parameters in edit mode and recording each personalized version)
several buy 1 lot (user parameter edit) positions with 12345 MN idenfication (ex : double clicking on the script named "buydirect_1_12345")
several SELL positions with 54321 MN (ex : double click on the script named "selldirect_0 01_54321")
the same on USDJPY 5MN with 67890 and 09876
...
four EA activated on four graphics (I don't know other way to process multiples EA in MT4):
"closeall 12345 plus50EUR":
will close all eurusd long positions (remember : marked as 12345 precedently) as soon they are giving together a 50 EUR (money default account in this case) profit (even if total short pos or global account balance is in the red).
will let active all other positions, especially the short positions of the same pair, whatever their own profit/loss or the global account p/l are
"closeall 54321 tp3 loss10" :
will close by trailing stop (3 points) (on overall pips futures variations) all EURUSD short positions (originately marked as 54321 when ordered),
preserving all other existing positions (especially the long pos on the same graphics)
as soon the global pip loss of these specific lots, has broken the -10 barrier.
idem with
"closeall 67890 minus25EUR" and "closeall 09876 profit5" in the same spirit but for the USDJPY 5MN trades
would be nice also to visualize on the graphics, filled orders and PRU levels in different colors by different MN families.
the magic number differenciations would permit to manage several TIME FRAMES distinctive strategies for a same given pair (ex : buy-sell-close actions for 15MN coexisting with their sisters for 1H goal)
concerning the cancelling of eventual pending orders, there is an efficient and dedicated script easy to find on the web (no need to the MN in my opinion), embedded in the script "close all" in a snap.
last but not least, would it be possible to program, instead of "market" orders, "limit" orders calculated for each concerned positions when the profit amount is reached, in order to precisely protect the profitable array of trades from reverse volatility ?
Hoping to have been clear although, and that someone will find and post the corresponding codes.
The scripts to enter are on this page 'Close all'/'Open' tools
I am using it like that:
I am renamed the scripts and the settings according to what I need.
For example, I need to open buy for EURUSD by 0.1 lot size with take profit 80 and stop loss 100 with magic number 12.
So, I opened this script in MetaEditor, place in the settings (inside MetaEditor)
Order_Type = 1; // 0- Current Price; 1 - SELLSTOP; 2 - SELLLIMIT
Lots = 0.1;
Price = 0;
Distance = 0; // Distance from current price in pips for pending orders
TakeProfit = 80; // TakeProfit in pips
StopLoss = 100; // StopLoss in pips
Slippage = 3;
Comments ="SELL";
Magic = 12;
PointRatio = 10;
than renamed as AllBuyOrders_5d_EURUSD80100_01 and "Save as" and than compile.
So, I have may be 10 scripts which I need all the time for pending orders, buy or sell orders with all the settings.
As to exit so it should be some scripts as well. Search the thread - I think you will find it.
Hi
I Was wondering if someone could please alter this close all orders EA to include the following options.or if you have one that already does this please post.
Add a trailing stop
Add a time Filter (maybe need a GMT +- setting for different brokers)
Thanks in advance
Last edited by jamesfrance; 05-21-2009 at 09:22 AM.
Reason: adding file