I've solved the problem as shown in the picture, dear @l-andorrà. Thank you very much for your attention and assistance. I am attaching a screenshot to the post for the benefit of other friends." "In the Variable section, it should be entered as double - Lots_Volume_Buy = 0.

Latest posts made by chattahooche
-
RE: Hedging problemposted in Questions & Answers
-
RE: Hedging problemposted in Questions & Answers
No problem, @l-andorrà Let's not get caught up in the infinite number of trades at the same time, dear Andorra. The bot should simply open reverse trades equal to the total lot size of the previous trades. For example, if the bot opened 5 lots of sell, it should open 5 lots of buy to hedge. If the bot opened 3 lots of sell, it should open 3 lots of buy when the conditions are met. It's actually that simple. But I can't seem to figure it out, and I end up doing it manually. It will only open one trade, and that trade will be equal and opposite to the sum of the other trades.
-
RE: Hedging problemposted in Questions & Answers
The bot should open reverse trades equal to the total lot size of the previous trades. There is no limitation here. For example, if the bot opened 5 lots of sell, it should open 5 lots of buy to hedge. If the bot opened 3 lots of sell, it should open 3 lots of buy when the conditions are met. There is no limitation on the lot size, dear Andorra. It will only open one trade, and that trade will be equal to the sum of the other trades
-
RE: Hedging problemposted in Questions & Answers
ok. lets use as a condition 9 and 50 simple ma cross
-
RE: Hedging problemposted in Questions & Answers
Sell (Hedge) Trade
1- If the 15-minute supertrend gives a sell signal,
2- Sum the lots of all open buy positions,
3- Open sell positions equal to the total of all open buy positions.Buy (Hedge) Trade
1- If the 15-minute supertrend gives a buy signal,
2- Sum the lots of all open sell positions,
3- Open buy positions equal to the total of all open sell positions.Close Sell (Hedge)
1- If the 15-minute supertrend returns to buy, close all sell positions.Close Buy (Hedge)
1- If the 15-minute supertrend returns to sell, close all buy positions. -
RE: Hedging problemposted in Questions & Answers
Let's say we have 4 buy positions: 0.01, 0.02, 0.03, 0.04, totaling 0.1 lots. When the 15-minute supertrend gives a sell signal, we will open a 0.1 lot sell position. In fact, this is all about accepting the loss instead of stopping the trade. If there is a significant drop here, we will escape from large losses because we have hedged our positions. Let's say our trades continue in the buy direction, and when the 15-minute supertrend returns to buy, the 0.1 lot sell hedge positions we opened will close. These positions can close in profit or in loss. If they close in profit, we can average down by taking new positions with the 15-minute buy signal. If they close in a loss, we accept it as a kind of stop. In summary, what I want to do is this: Condition (15-minute supertrend) >>> the total of all opened lots >>> open buy or sell positions equal to the total of all lots.
-
Hedging problemposted in Questions & Answers
Hello everyone. I'm facing an issue somewhere, and I would appreciate it if you could help. What I want to do is as follows: Let's say I have 3 buy positions (0.01-0.02-0.03) at a total of 0.06 lots. If a sell-oriented condition occurs, I want it to open sell positions equal to the size of these lots, which is 0.06 lots. In other words, I want it to hedge the trades. If, by any chance, the condition returns to a buy condition, I want it to close the sell positions it has opened
-
RE: Close position please help!posted in Questions & Answers
@jstap thank a lot. I need to add all of them to the expert advisor, including the pass part, right? I also wrote the amount of $ 20 under the profit trade section, will it be like this?
