How I can open the same number of long positions in the sale, and vice versa in the BUY with a ONE increase
-
Please help I am trying to create a robot when crossing two points buys and when crossing sell two points sells.
In case of repetition in the case of buying, the sale is checked and the winner closes after the intersection
In the event of a sell-off, the purchase is closed and the winner closes.
In case of purchase if there are five short positions and close two deals open three long positions more than selling onehttps://fxdreema.com/demo/simple
Required when you open three deals to buy, and reverse the trend of the sale, re-open four deals sell, so that buying and selling three of four increase one![alt text]



-
Could you please share you project? The link you shared is the one of the tutorials. Apparently you are looking for a martingale.
-
I couldn't share the link, because the project is experimental, or I don't know how to share the project. I copied the link and sent it to you.
Specifically, I would like to assume that there are three short positions, and the price goes to the buy condition.
Here I want him to open a four positions, and if the price goes again the condition of the sale opens five deals
As well.
So that every time the condition changes there will be one increase -
-
this my project
https://fxdreema.com/shared/RBWXmgaLSpecifically, I would like to assume that there are three short positions, and the price goes to the buy condition.
Here I want him to open a four positions, and if the price goes again the condition of the sale opens five deals
As well.
So that every time the condition changes there will be one increase -
Ok. This is what I recommend you:
-
Choose candle ID 1 on both operands in condition blocks 3 and 5. They are now looking at candle ID 0 and that is not necessarily good right now.
-
What numbers are supposed to be stored on variables 'Selllots' and 'Buylots'? I guess the reason of your problem is here. What numbers are supposed to be on blocks 42 and 43?
-
-
I put the variables in buying market positioning: check selling if there are open positions, for example, two transactions sale, will buy three deals.
if sell market positioning : check buy if there are open position three deals will sell four deals.
You can edit my project to correct it. i can not correct it
And I thank you for your time and effort, and I appreciate your reply -
What I would like to know is the real values those variables can have. Are they 2, 3, 5, or maybe 30, 40, 50?
-
I could not put the correct variables, I set them to try to change the number of trades in the event of a buy and sell condition only.
I don't know right or wrong -
These numbers I every time I try the expert does not succeed in changing the number of trades I delete, and put another.
But that's it -
General idea:
A position will be opened for each bar for each direction, and if the trend changes, the same positions will be opened in the previous direction + increase the position for each bar again.
When profit reaches more than loss, it closes all trades once. -
More than ten days we are looking for a solution, we have not found
-
@khalids222 Sorry to ask, but are you using google translate for your posts? I read your posts several times, but couldn't get what you want your EA to do. I think there is more a communication issue rather than a technical one.
-
Well, same happened to me, but I didn't dare to say it.

-
Yes I am using Google Translate, I attached a picture explanation.
as you see :
If the 5-day moving average crosses the 20-day moving average on a quarter hour candle for above the trade size will be : 0.01 then if If the 5-day moving average crosses the 20-day moving average on a quarter hour candle for Down the trade size should be (buy lots + add new) (0.01+0.01) total (0.02) and if the buy again a crosses to above i need to the size 0.03.

-
-
@khalids222 Okay, that helps a lot. The easiest approach is to have an integer variable as a multiplicator for the lot size. Each time you open a trade for instance (or when one trade is closed depending on your preference) you would adjust that counter variable +1
I'm currently on my mobile phone and can't take a look at your shred project in detail.
Let me know if you require further help to implement the suggested solution. -
@trader-philipps said in How I can open the same number of long positions in the sale, and vice versa in the BUY with a ONE increase:
Okay, that helps a lot. The easiest approach is to have an integer variable as a multiplicator for the lot size. Each time you open a trade for instance (or when one trade is closed depending on your preference) you would adjust that counter variable +1
I'm currently on my mobile phone and can't take a look at your shred project in detail.
Let me know if you require further help to implement the suggested solution.I need help because I did not understand the solution, since I tried a lot of variables and methods and did not work
-
In this project there is no direct closure but after several buy and several sale is verified the total profit and loss and all transactions are closed once
-
@khalids222 Here you go. I don't care for reset the counter on closure, yet. Lot Multiplicator
Basically I added the counter variable and than each time BUY or SELL block is entered (white dot) I add +1 to that variable.
