'Close all'/'Open' tools - page 36

 

Does someone had test open position script on activtrade broker?

because my script wich work with fxpro stop working with activtrade, maybe due to their politic that don't accept SL and TP on a "market order", someone have a trick for make a script open an order...then make a break (1 or 2s) then modified order to put SL and TP.

I try this (in attachment) but don't work

Files:
buy1.mq4  1 kb
 

Buy/sell scripts

Are these the only things i need to change?

double Lots = 0.05;

int StopLoss=50;

int TakeProfit=200;

And how do i add keyboard shortcut to my platform? Thanks.

cmalbranc:
I found what i need, and attach below two modified script for simple buy or sell without any confirmation (be carefull on real trading).

To use, just edit and replace value for your SL and TP strategy, compil and let's go.

usefull you like to shoot some pips on "rush" (on news release for exemple).

If you prefere with an advertising before order sending, just remove // before property show_confirm.

On my plateform i add keyboard shortcut for better reactivity, but if someone know how to custom a button in MT4 it will be the best.

(use SL and TP according the digit of your currency, make copy renamed for 5digit and 4digit )
 
romotly007:
Are these the only things i need to change?

double Lots = 0.05;

int StopLoss=50;

int TakeProfit=200;

And how do i add keyboard shortcut to my platform? Thanks.

yep,

with this settings you will send an order for 0,05 lots with 50pips for SL and 200 for TP if your broker is an 4 digit (activtrade for exemple) or 5 pips SL and 20 pips TP if your broker is a 5 digit (forexpro for exemple).

For set shortcut, just make a right clic on the script, then you will saw the menu for that. (make sure you don't assign an shortcut that exist for an another function )

 
jamesfrance:
Thanks but none of them do the job required -trailing stop on all open orders

Trailing stop don't exist in script, maybe in EA.

cedric

 

Buy/sell exit script

Thanks...I will test it next week and I hope the entry for buy/sell is like the speed of light faster than manual entry? Secondly, do you have or know about any script for exiting a trade faster than manual exit to save valuable pips? Thanks

cmalbranc:
yep,

with this settings you will send an order for 0,05 lots with 50pips for SL and 200 for TP if your broker is an 4 digit (activtrade for exemple) or 5 pips SL and 20 pips TP if your broker is a 5 digit (forexpro for exemple).

For set shortcut, just make a right clic on the script, then you will saw the menu for that. (make sure you don't assign an shortcut that exist for an another function )
 
romotly007:
Thanks...I will test it next week and I hope the entry for buy/sell is like the speed of light faster than manual entry? Secondly, do you have or know about any script for exiting a trade faster than manual exit to save valuable pips? Thanks

i use this one, it work good for close the first open position (in my case i take only one position so no problem) i also attach the script for close all open position and pending position if you need it.

as you will saw it's faster than open and set up manually orders, but sometime and with some brokers you will had some slow down (at news release for exemple).

 

Men....thanks a lot...just what i need cos when i try to open or exit a position....I keep getting delays thereby loosing valuable pips. Thanks again....I love forex-tsd.com!!!

 

Scripts BuySell stop

Could someone please mod. the attached scripts so

you can enter a buystop,sellstop at a specific price you want

Files:
 

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.

Thanks in advance.

 

Hi jpdus,

The scripts to enter are on this page https://www.mql5.com/en/forum/173000

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.

Reason: