| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Request: Close At Breakeven - Specific Pair https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3529 |
Page 2 of 3 |
| Author: | longytravel [ Wed Mar 26, 2014 7:14 pm ] |
| Post subject: | Request: Close At Breakeven - Specific Pair |
I am sure it is my poor explanation! You can see in the picture i have a serious of AUDCHF trades open as sells, they are going against me. I opened that 0.02 lot buy to hedge that drawn down. The AUDCHF buy closed on its own (as did a similar trade on GBPCAD and what was interesting is both those closed trades were at net 0 together). I would want all AUDCHF trades to close at BE if the trades ever get to that point! |
|
| Author: | longytravel [ Wed Mar 26, 2014 7:18 pm ] |
| Post subject: | Request: Close At Breakeven - Specific Pair |
You can see both the GBP and AUD trades closed at breakeven (together). I still had other trades open on those pairs. |
|
| Author: | milanese [ Wed Mar 26, 2014 7:18 pm ] |
| Post subject: | Request: Close At Breakeven - Specific Pair |
so set the EA only at AUDCHF and make sure that this trades have all the same magicnumber and set this magicnumber as magicnumber for the EA than it will exactly do what you want.. Cheers Tommaso |
|
| Author: | longytravel [ Wed Mar 26, 2014 7:38 pm ] |
| Post subject: | Request: Close At Breakeven - Specific Pair |
That makes sense and i should know better. Thank you for your patience. Last question i promise and i will leave you concentrate on more important matters! I want to be able to have this going a few charts for if i am running hedges on different pairs. I also use a basic script to drop the trades as i use limit orders. I have attached the set that i think would work.......effectively i have just set the magic number to '0' for each element where magic number is asked for within the code. I would have the next pair as '1' and so on. Just means i can drop without having to change in the details in the input boxes!? |
|
| Author: | milanese [ Wed Mar 26, 2014 7:58 pm ] |
| Post subject: | Request: Close At Breakeven - Specific Pair |
It should do it, if you just change hardcoded the extern int MagicNumber=0; to the value you want than recompile ..Cheers Tommaso |
|
| Author: | mobthehop [ Thu Mar 27, 2014 10:26 am ] |
| Post subject: | Request: Close At Breakeven - Specific Pair |
Love it! Thanks to original requester and T for coding it.... T, could you do me a personal favour and code a version that: - multi pairs - ie only need to be run off one chart 1. closes all orders of any ONE currency pair if the profit percentage has reached x% of balance 2. close all open / pending orders of ALL pairs when profit has reached y% of balance (similar to a basket trader) or 3. close all open / pending orders of ALL pairs when profit has reached # of open pairs multiplied by z% of balance or eg: 1. EUR/USD, balance of account is 5000, profit target 1% (same for each pair!) - close all open orders (including any pending orders) of EUR/USD when total profit of all open orders for EUD/USD has reached 50.... 2. Close all orders across the board if overall profit has reached 3% (y%)of balance or 3. I have orders open for AU and EJ, profit per pair 0.5% (z%) close everything if 1% of balance is reached Would very much appreciate your help as I am looking for a "helper" like this for ages.... My apologies to the thread owner for posting this here... / Thks in advance MOP |
|
| Author: | milanese [ Thu Mar 27, 2014 10:29 am ] |
| Post subject: | Request: Close At Breakeven - Specific Pair |
I will later take a look, what I can do.. Cheers Tommaso |
|
| Author: | mobthehop [ Thu Mar 27, 2014 10:40 am ] |
| Post subject: | Request: Close At Breakeven - Specific Pair |
T, appreciated.... Please note that I updated my post, just when you posted your reply... Sorry / Mop |
|
| Author: | milanese [ Thu Mar 27, 2014 7:11 pm ] |
| Post subject: | Request: Close At Breakeven - Specific Pair |
I did it code and open a new topic for this http://www.stevehopwoodforex.com/phpBB3 ... 798#p88798 Cheers Tommaso |
|
| Author: | longytravel [ Fri Mar 28, 2014 6:42 pm ] |
| Post subject: | Request: Close At Breakeven - Specific Pair |
Dont worry about it Mop, its Tommaso we owe and apology too as i see he has been doing more good work for you! I have started setting up my scripts so that they have individual Magic Numbers, bad news is that the scripts now dont drop the actual order. I get the dialogue box asking if buy or sell but when selected it doesnt drop the order?! Any ideas anyone!? |
|
| All times are UTC | Page 2 of 3 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|