Please Help Everyone (^0^)

 

I had a very easy question, please help. i am confuse, i end up with several pending order open at the same time.


How to make only 1 Open position ? ex EURUSD SELL 1.5800,If the graph up or down and touches that price, it is still the same, doesn't create another.

just like making 1 open or pending order manually

can be use to with pending order.


Thank you

 

I am confused too :)


1. Are you talking Expert Advisor you have written which opens several pending orders at same time ?

2. Are you talking ToolBar > Tools > New Order or (F9) ?


IF (1) above, please show your code


IF (2) above, read Client Terminal Help (F1): Trading > Trade Positions > Placing of Pending Orders

Managing of Trade Positions — Placing of Pending Orders

HTH

 
ukt:

I am confused too :)


1. Are you talking Expert Advisor you have written which opens several pending orders at same time ?

2. Are you talking ToolBar > Tools > New Order or (F9) ?


IF (1) above, please show your code


IF (2) above, read Client Terminal Help (F1): Trading > Trade Positions > Placing of Pending Orders

Managing of Trade Positions — Placing of Pending Orders

HTH

here is the code, it is from double pending beta by komposterous on this site. I only short it becouse i didn't like stoploss


My problem is This EA Open Position hit SL or TP and then making a new 2 pending orders. I tried to modified to ADD the pending before the Open Position hit their SL or TP. and also read their Magic Number to make several if function that control lot of pending order.

Sound confusing my friend.

Files:
 
ukt:

I am confused too :)


1. Are you talking Expert Advisor you have written which opens several pending orders at same time ?

2. Are you talking ToolBar > Tools > New Order or (F9) ?


IF (1) above, please show your code


IF (2) above, read Client Terminal Help (F1): Trading > Trade Positions > Placing of Pending Orders

Managing of Trade Positions — Placing of Pending Orders

HTH

so my conclusion is i must get the setting of 1 Open only to set up the other.

Please Help friend,

 

nope - sorry, no way can devote time/energies to that type of code.

read https://book.mql4.com/trading/index think about own fx method and then code it - do many times and learn by doing, this is by far your best bet.


(apologize if sound harsh - but too many think can hack bit of code and be FX whiz in MetaTrader, far more profitable to use Client Terminal as manual trading platform, masses of money making positions can be seen every trading day :o)))

Best...

 
ukt:

nope - sorry, no way can devote time/energies to that type of code.

read https://book.mql4.com/trading/index think about own fx method and then code it - do many times and learn by doing, this is by far your best bet.

<<New added>>

Part of my plan is:

ex Open Sell in 1.5800,

if the market went up to 1.5850, open with Buy 1.5852, when up again to 1.5900, again Buy 1.5902

if the market went down to 1.5750, open with Sell 1.5750, when Down again to 1.5700, again Sell 1.5700

so every order with SL and TP 50 pips

but in the trial there is several open Sell 1.5800, or several Pending in 1.5852 and 1.5750


Thats why i need only 1 if open sell in 1.5800 and only 1 Buystop 1.5852 and only 1 Sellstop 1.5750


Of course practise make perfect.

But maybe, just maybe there is a way.

Thanks

 

good... you are thinking about 'your' system.

why not do one part at a time?

1. only do LONG

2. just ordersend

3. now have order open - so learn how to close it when reach say openPrice+50pips or indeed openPrice-50pips if market turns

By doing just above, you have learned how to open and close a position, yes?

This involves EA monitoring price and taking action when certain condition(s) arise, yes?

Many skills will have been developed just by this practice. - only demo a/c so no worry :o)


So, by learning and 'getting right' above, you could then make new EA doing SHORT positions only - why? well... arithmetic calculations [somehow] decide to mess you about and is easy to use "+" instead of "-" ...


finally you can bring LONG and SHORT code together in third EA - you will then learn how to only do one or the other by using your already learned skills !


soon... you will be very happy at your new knowledge, yes???


Also, by learning how to do your own coding you have 'knowledge' of it, yes? meaning you will not be in position of wondering why more than one position opened!


above all else.............. have fun :o))

Reason: