I want help with adjusting the lot
-
In this example:
In the case of the buying trend, the expert advisor collects the short positions, and increases the buy one over the sell ,and vice versa
I mean if buying : 0.03 Then the selling trend will change, it will open 0.04 sell
then 0.5 buy then 0.06 sell etc.......
But the problem is in the same direction .If the trend is buy and another buy order occurs, there will be complications .
Meaning if there was a buy and another buy occurred
buy: 0.5 then buy 0.10 then buy 0.20 then buy 0.40 then buy 0.80
If I want it in the same direction, the difference is 0.10 only -
@ROAR I appreciate your time and effort, could you help me to determine the lot size please?
I tried all possible methods but it didn't work
https://fxdreema.com/shared/mQcRAcxoc -
-
If the trend is fixed as buy or sell, the increase will be 0.01 FOR ONE PER BAR
When the trend moves from selling to buying or vice versa from buying to selling, the increase is (sell OR buy +0.01) THEN increase 0.01 in the same trend .
I don't know if the explanation is clear or not? But this is what I want to do with this project
-
@khalids222 you need to first calculate the total of your open lots.
Use loop "for each trade" and sum up all the lot sizes in one variable. -
@roar
here https://fxdreema.com/shared/fSQf4CGO
I deleted the additions that I added in the first example.
Here the EA works well when switching from selling to buying and vice versa.
In the event of a buying trend, I want him to add a lot above the selling lot for each new bar .
So I put the plugins I deleted, but it didn't work -
In this example when going from sell to buy it works fine no problem.
-
The problem is the addition of a fixed volume in the same direction
-
@khalids222 all right, let me get the strategy:
- when MA is up -> buy 0.01 every bar
- when MA is down -> sell 0.01 every bar
- when MA changes direction, adjust open positions so that net position is 0.01 to the correct direction
Right?
-
@roar said in I want help with adjusting the lot:
when MA changes direction, adjust open positions so that net position is 0.01 to the correct direction
Yes that's right
-
@khalids222 here's how I would do it: https://fxdreema.com/shared/czm4e40xb
I try to avoid on/off blocks and "on Trade", because they make the system a bit confusing to manage.
Edit: fixed the comment block for tracking https://fxdreema.com/shared/sxt8wRKgc
-
@roar Thank you very much it works well, thank you with all my heart.
Grateful to you
