question about the exit
question about the exit
When I have 2 long positions, $100 loss for the first one and $200 loss for the second one, how can I close the second one firstly and hold the first one still?
- Anastassia
- Posts: 179
- Joined: 18 Jan 2010
- Been thanked: 4 times
Re: question about the exit
Hi Steven,
If symbols are the same then the position at Broker for this symbol is joined. If that is the case, the question is not very clear to us. Please explain it in detail.
Thank you in advance
If there are two different symbols, you won't have any problems at all. Positions for those two symbols won't intersect so you can simply trade from two charts.When I have 2 long positions..
If symbols are the same then the position at Broker for this symbol is joined. If that is the case, the question is not very clear to us. Please explain it in detail.
Thank you in advance
Re: question about the exit
Hi Anastassia,
Same symbol and the pyramiding was turned on, So I can buy 2 contracts at the different entry price, after a while, I found the first contract had a loss of $200 and the $100 for the second one, So I want to close the first contract firstly and hold the second contract.
The question is:
How can I get the contract with $200 loss? I know the keyword "entryname" can be used in MC6, Could you show me the way?
Thanks
Steven
Same symbol and the pyramiding was turned on, So I can buy 2 contracts at the different entry price, after a while, I found the first contract had a loss of $200 and the $100 for the second one, So I want to close the first contract firstly and hold the second contract.
The question is:
How can I get the contract with $200 loss? I know the keyword "entryname" can be used in MC6, Could you show me the way?
Thanks
Steven
Re: question about the exit
I found the below new feature of MC6, Can this be help?
"If pyramiding is enabled and several simulated entries are made before Autotrading is turned on, software now takes them into consideration as separate entries and is able to use "exit from entry" logic in asynchronous Autotrading mode on those entries."
"If pyramiding is enabled and several simulated entries are made before Autotrading is turned on, software now takes them into consideration as separate entries and is able to use "exit from entry" logic in asynchronous Autotrading mode on those entries."
- Anastassia
- Posts: 179
- Joined: 18 Jan 2010
- Been thanked: 4 times
Re: question about the exit
Hi Steven,
Below is the example demonstrating an exit from the specific entry.
Thank you
Below is the example demonstrating an exit from the specific entry.
Code: Select all
Inputs: STime(310);
if currentbar > 1 and marketposition = 0 and time > STime then
begin
Buy("Break Up") next bar at market;
end;
If Marketposition > 0 then
begin
Sell("Long Stop") from entry ("Break Up") next bar at market;
end;
Re: question about the exit
Dear Anastassia,
If there are 2 entries called "break up1" and "break up2" entered in different time, How can I get the entry name of the one which got a more loss?
Thanks,
Steven
If there are 2 entries called "break up1" and "break up2" entered in different time, How can I get the entry name of the one which got a more loss?
Thanks,
Steven
Re: question about the exit
You can use "Positionprofit" to distinguish between your position,
for example
for example
Code: Select all
If Marketposition > 0 and PositionProfit =-200 then
begin
Sell("Long Stop1") from entry ("Break Up1") next bar at market;
end;
If Marketposition > 0 and PositionProfit =-100 then
begin
Sell("Long Stop2") from entry ("Break Up2") next bar at market;
end;
- Anastassia
- Posts: 179
- Joined: 18 Jan 2010
- Been thanked: 4 times
Re: question about the exit
Hi Steven,
Thank you
There is no way to get the name of the entry with the greater loss however you can get the number of the entry by comparing profits. Use OpenEntryProfit keyword.How can I get the entry name of the one which got a more loss?
Thank you