How can I collect the latest open positions in the event of a trend change?
-
@khalids222 You still didn't answer my question. In the screenshot above the EA gave the following signals:
This sequence is- Trade: Sell
- Trade: Buy
- Trade: Buy
- Trade: Sell
- Trade: Sell
- Trade: Buy
- Trade: Sell
What lot size should each trade have? Did it take too many trades? If so, where would the EA start over again and reset all counters?
This is important as if there are buy trades opened and followed by sell trade(s), do we need to care about the open buy lots or not? -
@trader-philipps
Excuse me, I did not understand your question well. So I could not answer you.
But to my understanding
In the picture, the deals were on Frame five minutes and I put it to experiment just with a big contract starting from 0.10 not 0.01I don't need to reset it at work because the lot will be 0.01 + for each trade .
Usually I work at 1H AND 4H ONLY.I think there will be a lot of deals
What actually happens is exactly in this equation
. It will answer all your questions.BUY = ( Previous BUY - Previous SELL +1)
SELL = (Previous SELL - Previous BUY +1) -
@khalids222 I think that doesn't make sense.
If I have 0.01 buy, 0.02 sell and 0.03 sell, next buy is 0.01 -0.05 +0.01 = -0.05
PLEASE TAKE MY EXAMPLE FROM ABOVE AND WRITE THE EXPECTED LOT SIZE PER TRADE!!
1st Signal/Trade: Sell
2nd Signal/Trade: Buy
3rd Signal/Trade: Buy
4th Signal/Trade: Sell
5th Signal/Trade: Sell
6th Signal/Trade: Buy
7th Signal/Trade: SellMy guess:
- Sell 0.01 -> (initial/new 0.01)
- Buy 0.02 -> (0.01 Sells + new Buy 0.01)
- Buy 0.04 -> (0.02 old Buys + 0.01 Sells + new Buys 0.01)
- Sell 0.08 -> (0.06 old Buys + 0.01 old Sells + new Sell 0.01)
... and so on right? If not please tell me the exact vakues per signal trade in the list:
1. Trade: Sell 2. Trade: Buy 3. Trade: Buy 4. Trade: Sell 5. Trade: Sell 6. Trade: Buy 7. Trade: Sell -
@trader-philipps my guess
1st Signal/Trade: Sell = (initial/new 0.01)= (Previous BUYs (0) - Previous SELLs (0) +1 ) = 0.01
2nd Signal/Trade: Buy = ( Previous SELLs (0.01) - Previous BUYs (0) + 1) = 0.02
3rd Signal/Trade: Buy= ( Previous SELLs (0.01) - Previous BUYs (0.02) +1) = 0.02
4th Signal/Trade: Sell = (Previous BUYs(0.04) - Previous SELLs (0.01) +1) = 0.04
5th Signal/Trade: Sell = (Previous BUYs( 0.04) - Previous SELLs ( 0.05) +1) = 0.02
6th Signal/Trade: Buy= ( Previous SELLs (0.7) - Previous BUYs (0.04) +1) =0.04
7th Signal/Trade: Sell= (Previous BUYs (0.08) - Previous SELLs (0.07) +1) = 0.02 -
@trader-philipps
reset all counters when close all position. -
@khalids222 Okay, if I have more time I'll think of the algorythm behond it. I'm traveling right now and will not be able to take a deeper look.
-
@trader-philipps said in How can I collect the latest open positions in the event of a trend change?:
Okay, if I have more time I'll think of the algorythm behond it. I'm traveling right now and will not be able to take a deeper look.
Ok I wish you a happy travel. THANK YOU VERY MUCH
-
@khalids222 So after having a deep thought about it, the algorythm seems to be MathAbs(buylots-selllots)+lots. MathAbs calculates the absolute number, which means 1 and -1 have the absolute number value of 1.
Right? -
@trader-philipps said in How can I collect the latest open positions in the event of a trend change?:
So after having a deep thought about it, the algorythm seems to be MathAbs(buylots-selllots)+lots. MathAbs calculates the absolute number, which means 1 and -1 have the absolute number value of 1.
Right?Yes, it is true there are two methods: The first is to use the absolute value. This is easier and sufficient.
The second method: squaring the number and then putting the root in it, thus eliminating the negative.I think the first is easier