@bk7
What I wrote here is not different from what I wrote previously, but here I opened four deals? Assuming that the price did not rise until after opening four deals
In this case, I want to close the last two deals
This was clarified in determining the closure of deal No 3 & 4
Meaning, I want to close the last two deals every time even if the number of deals is one hundred
Posts made by khalids222
-
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
-
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
Whenever the price drops ten points, a buy deal will be opened.
When the price goes up, there will be only two options:
Let me explain better1- buy = 1280 lot = 0.01
2- buy = 1270 lot = 0.02
3- buy= 1260 lot= 0.03
4- buy = 1250 lot = 0.04 the price here now
when price rise from 1250 to 1260 i want close number 3 &4 >
Then there will be two options, the price continues to rise and deals are closedThe second option is to continue going down, and there will be a certain limit, then it will enter the sell
-
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
@bk7 okay so you will never ever have more thant 2open buy positions at the same time, correct?
yes it is correct
I will try it -
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
@bk7 said in How can I find the average opening price for the last two positions?:
for me there are open questions:
how many open buy positions you have max ?
exceeds, means avg of 2 positions is below current price, if you have more positions you take any positions or is there a rule?
ist just price a factor or volume as well?
you take swaps/commissions into account or just price ?Suppose I have one buy transaction, and when it go down, I will increase it by one as well. When the price exceeds the value of the buy before the last, I want to close the last two deals.
1- buy = 1250
2- buy = 1235
ave buy price now = 1242.50
when price highest = 1244
i want close 2 position this rule for all -
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
@bk7 If the price exceeds two buy deals, I want to close these two deals that are less than the price
-
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
@bk7 Thank you and where will the closure be?
-
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
@bk7 said in How can I find the average opening price for the last two positions?:
so you still need the average price of the last 2 openend positions?
do you need this for all orders no matter buy or sell, or 1 avg for buys and 1 for sells?First of all, I apologize for the delay in responding, due to the death of a dear friend of mine.
Yes, I want it for each one individually
1 avg for buys and 1 for sells -
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
@jstap I'm very sorry, I didn't mean anything, my goal was to open the topic only for participation. It was not my intention to blame or otherwise.
I thank you for your time and effort -
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
@ladydolares
It's not your fault
The issue is not resolved -
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
@jstap
The last two deals have not been closed

-
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
@jstap Overall, thank you very much, I will try
-
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
@jstap
In this case, all deals will be closed, not just the last two &This is not required

-
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
@jstap said in How can I find the average opening price for the last two positions?:
Hello, I have had a look at your project I have taken a picture of a few changed bits, although I haven't tested I think should work.
I have put the reset variable under on trade, as long as result is used before a new trade is closed it will work fine, as a general rule keeping pink blocks separate seems to work better.I appreciate your reply, thanks a lot but it didn't work
Didn't close the last two deals only the last
-
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
@jstap @bk7
First of all, I would like to thank you for your efforts and response, and I want to share part of the project with you to understand what is required more clearly. this linkhttps://fxdreema.com/shared/HKa3gDAtd
Every time the price goes back ten pips down, a buy position will be opened.
And when the price goes up ten points, the last two deals will be closed, their sum is positive
In this case, every time the price goes down 10 pips, how do I close the last trade and the one before it? In the event that the ten points variable moves? I need to know the average of the last two trades to close them together -
RE: How can I find the average opening price for the last two positions?posted in Questions & Answers
@l-andorrà yes i need to close . You can explain
-
How can I find the average opening price for the last two positions?posted in Questions & Answers
How can I find the average opening price for the last two positions?
If there are five positions .
i used BUCKET FOR TRADES but it is give me average to all opening price buy or sell - i need average opening price for te last /newest two only

