Pending Order EA - page 5

 
jomonarikkat:
ikhram_2_ea_by_dzhini.mq4

Dear mladen ,

Can u add stoploss in this ea.

Thanks

jomonarikkat

Try it out now : ikhram_2.01_ea_by_dzhini.mq4

PS: since everything in that Ea work using points, so does stop loss too

 
mladen:
jomonarikkat

Try it out now : ikhram_2.01_ea_by_dzhini.mq4

PS: since everything in that Ea work using points, so does stop loss too

Thanks mladen..

 

hi, i am trying to add pending orders buy and sell to the market orders opened by EA

i wrote this code for only open 1 pending order both sides of market order:

for(int cnt = 0 ;cnt<OrdersTotal();cnt++)

{

//PENDING ORDERS

if(OrderType()==OP_BUY||OrderType()==OP_SELL)

{

{

double BuyLevel = OrderOpenPrice() + Distance*Point;

double SellLevel = OrderOpenPrice() - Distance*Point;

{

openOrder(getLots(),MagicNumber,OP_SELLSTOP, SellLevel, _sl,_tp);

openOrder(getLots(),MagicNumber,OP_BUYSTOP, BuyLevel, _sl,_tp);

}

}}

it is not working at all, i don't know how to write it, can anybody help me please???

Thanks

Files:
csell.png  30 kb
 
daniel1983:
hi, i am trying to add pending orders buy and sell to the market orders opened by EA

i wrote this code for only open 1 pending order both sides of market order:

for(int cnt = 0 ;cnt<OrdersTotal();cnt++)

{

//PENDING ORDERS

if(OrderType()==OP_BUY||OrderType()==OP_SELL)

{

{

double BuyLevel = OrderOpenPrice() + Distance*Point;

double SellLevel = OrderOpenPrice() - Distance*Point;

{

openOrder(getLots(),MagicNumber,OP_SELLSTOP, SellLevel, _sl,_tp);

openOrder(getLots(),MagicNumber,OP_BUYSTOP, BuyLevel, _sl,_tp);

}

}}

it is not working at all, i don't know how to write it, can anybody help me please???

Thanks

daniel1983

What does your openOrder() function look like?

 

[REQ] Please share an EA which managing pending order

Hi everyone. I believe most of us have seen OCO (one-cancels-other) feature in several trademanager EA, am I right? However, have you come across with placing pending order after open order been closed(TP/SL)?

So, I will explain the scenario with the aid of this picture.

Initially, the EA will open two pending orders waiting for the price to hit either one. The pending order types varies with the current price position. Eg. If current price is above the two lines, buy limit & sell stop are placed.

Refer to the picture, :-

1) Buy stop --> Buy

2) Buy --> Close, Buy stop is placed at the price which same as previous price level /Sell stop --> Sell

3) Sell --> Close, Sell stop is placed at the price which same as previous price level /Buy stop -->Buy

4) Buy --> Close, Buy stop is placed at the price which same as previous price level /Sell stop --> Sell

5) Sell --> Close, Sell stop is placed at the price which same as previous price level / Buy stop --> Buy

Thus, there is no limitation on placing pending order after open order been closed. Also, the parameter should include magic number input (can be done manually) and total profit/loss for the specific magic number of total trades can be displayed on the screen chart will be good. Something look like this.

In a nutshell, I would be grateful if you giving a helping hand. Thanks for reading my post. Happy trading~ =)

Files:
 

please help for modify BUYSTOP pending order

please give code for my strategy..

i need to place BUYSTOP order with 5 SL & 2 gaps. if market direction revers i need to trail this buystop order in every tick.

 
forex-dst:
Script to set multiple pending orders in succession.

I am looking for a specific script.

It is simply a "Multiple Pending Order Script in Succession". I would like to open multiple pending orders from a specific price in a same direction (buy or sell).

"Multiple Pending Order Script in Succession for Buy orders":

I will need to set the script to place "buy" orders from a specific price.

The script will allow me to adjust the-

1) number of pending orders

2) number of pips between each pending order

3) T/P and S/L for all the pending order (T/P and S/L are the same for all orders)

Below is an example:

Current Price is at 1.30200

I want to place 5 "buy" pending orders in succession from 1.30300 and each pending order must be 2 pips apart. The T/P and S/L can also be specified. The script will then place all pending orders at these following prices at once:

1st Pending Order = 1.30200

2nd Pending Order = 1.30220

3rd Pending Order = 1.30240

4th Pending Order = 1.30260

5th Pending Order = 1.30280

I hope you understand what I am trying to explain.

Will look forward to constructive comments.

Did you find this yet? I am looking for the same.

 
drfrankm:
did you find this yet? I am looking for the same.

one good turn deserves another. See attached ea

 

Have tried coding a multi order pending EA to meet below specs but having difficulty matching pendingorders to initial market entry order. When the PO are filled it reopens PO at higher lever

Either manual or robot initiates A pending buy position is opened at 10:00.00Hrs order /ticket number 312098 lot 0.01 price 1.23400 expiration time 13:00.00Hrs

Market price is 1.23080 at 10:00.00Hrs

Fifteen minutes later 10:15.00Hrs market price reaches and activates pending buy position entry price.

The EA being requested should be able to do as follows to when an example of the above happens:

The EA should be able to place a maximum of five pending orders. The five pending orders that can be placed should be subdivided into two categories. Category A having ability for placing two pending orders and Category B having ability for placing three pending orders.

EA should have input parameter for each pending order to be opened.

1- Distance in pips from initial buy position in our example order/ticket number 312098

2- Stop Loss Take Profit Break Even for the pending order

3- Lot

4- Timing

Category A pending orders should be placed at once or immediately that the initial manual pending order is placed. Category A pending order should close also if the initial manual pending order expires or closes.

Category B pending orders should wait for market price to activate the initial manual pending order. Once the initial pending order is activated, Category B pending orders should be placed thirty or sixty seconds from the initial buy pending order having been activated by market price.

FOLLOWING THE PENDING BUY ORDER EXAMPLE STATED ABOVE, BELOW PARAMETERS ARE INPUT INTO EA

Example pending order No.1 is to 4 pips with SL 14 TP20 BE 12 lot0.02 CATEGORY B

Pending order No.2 is be 5 pips with SL 17 TP20 BE 12 lot0.02 CATEGORY B

Pending order No.3 is to be 7pips with SL20 TP 20 BE 12 lot0.02 CATEGORY B

PendingorderNo4 is to be 60pip with SL20 TP 150 BE 0 lot 0.01 CATEGORY A

PendingorderNo5 is to be 90pip with SL20 TP 150 BE 0 lot 0.01 CATEGORY A

Following our example set

PO 1 =1.23440 lot 0.02 SL 1.23300 to be placed at10:15.30

PO 2=1.23450 lot 0.01 SL 1.23280 to be placed at 10:15.30

PO 3=1.23470 lot 0.03 SL 1.23170 to be placed at 10:15.30

PO 4 =1.24000 LOT 0.01 SL 1.23980 to be placed at 10:00.00

PO 5=1.24300 lot 0.01 SL 1.24280 to be placed at 10:00.00

Should market price Retraces sharply and going below the entry price of order number 312098 and knocking out the Stop Losses of the activated PO1/2/3/4/5. The EA should place new pending orders in the same price the earlier ones have been knocked out from. Let us say the time the above PO’s knocked out is 11:22.13

Example the above Pending Orders are repeated.

PO 1 =1.23440 lot 0.02 SL 1.23300 to be placed at11:22.43

PO 2=1.23450 lot 0.01 SL 1.23280 to be placed at 11:22.43

PO 3=1.23470 lot 0.03 SL 1.23170 to be placed at 11:22.43

If PO4/5 were activated and stopped they should be placed

If market price continues retracing until it also knocks out the initial buy position order number 312098 then any pending orders relating to this order number should also close.

[attach]1690211[/attach][attach]1690212[/attach][attach]1690213[/attach][attach]1690214[/attach][attach]1690215[/attach]

 

Hello,

I have been reading articles about expert advisor for days.

I have exhausted.

Is there any ea doing such a things below:

---------------

Example: For the any bar(Lets say Date 15.06.2015 and Clock 18:16) in M1 chart, the bar will be opened in 18:16 and it will be closed in 18:17. Expert advisor will open buy stop and sell stop orders shortly before closing the bar. And it will close all pending orders shortly after opening the next bar(18:17). That is it.

Reason: