Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 113

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Actually, yes. Maybe it's too late, but I don't get it. That's essentially the profit in pps. that's the distance from opening to closing. Why then is the expression wrong?
I'm getting a bit full of myself... :) The problem:
1. There is an open position of 0.1 lot
2. Its TakeProfit value is 50 pips.
3. I calculate its potential profit according to the formula PotentialProfit = Lots*TakeProfit*MarketInfo(Symbol(), MODE_TICKVALUE);
4. from the calculation I get the potential profit of $5.00 (0.1*50*1.0).
The position goes in the red and at some point one more averaging Buy opens, but with 0.2 lot
1. I calculate Breakeven for these two positions. The function has been used for a long time, as required, and I do not have any complaints so far:
2. Perfect. You have calculated the breakeven level, but... if you put the tokens of those two positions on it, they will close at zero. Okay, I think. Now I need to add to this level of the BU as many points as I need to obtain a total profit, equal to the previously calculated - $5.
3. And here is where I get a blockage in my brain. What I do: I take $ 5, divide by the total lot of these two positions (0.1 + 0.2 = 0.3), multiplied by TICK_VALUE
I have 5/(0.3*1.0) = 16.6666 Then I multiply it by Point (0.00016) and add to Breakeven price.
4. Perfect. Takes are transferred there, but it seems to me that the total profit of two Baisers closing at this level is not equal to $5 - it seems to me less. This can be seen from the testing chart. It clearly shows that when one position closes, the balance increase is much greater than when multiple positions are closed at the calculated total take level (you can see these places on the chart by the appearance of the equity line on them). The chart:
Where am I wrong?
I understand that you can print the total profit, but... I want to understand where I could be wrong in my calculations, not the value of the variables. I have printed them already.
I have a price consisting of 5 digits. Example: 1.3221.
It means 4 digits. Meaning 4 or 5 after the decimal point. Of five digits, it would be, for example, 132210.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Gentlemen programmers, please advise how to combine an EA with an indicator?
For example, I took a simple bot mo_bidir.mq4 which trades using its own algorithm and I want it to open trades using its own algorithm but after 3 MA signals
For example on signal - Three Moving Averages:
FastEMA>MediumEMA>SlowEMA (trending up) - bot buys
FastEMA<MediumEMA<SlowEMA (trend down) - bot sells
Inp_Signal_ThreeEMA_FastPeriod = 8;
Inp_Signal_ThreeEMA_MediumPeriod = 38;
Inp_Signal_ThreeEMA_SlowPeriod= 48;
I want my Expert Advisor to trade on 5-minute timeframe and the indicator to give signals from daily or 4hour timeframe, and I want to be able to change timeframes in the settings of bot.
\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
I apologize for the repetition, but at least tell me in which forum thread to apply, or should I create a new thread?
I do not know what to do.
Hi all. Can you explain why OrderSend is not opening a position?
I'm getting a bit full of myself... :) The problem:
1. There is an open position of 0.1 lot
2. Its TakeProfit value is 50 pips.
3. I calculate its potential profit according to the formula PotentialProfit = Lots*TakeProfit*MarketInfo(Symbol(), MODE_TICKVALUE);
4. from the calculation I get the potential profit of $5.00 (0.1*50*1.0).
The position goes in the red and at some point one more averaging Buy opens, but with 0.2 lot
1. I calculate Breakeven for these two positions. The function has been used for a long time, as required, and I do not have any complaints so far:
2. Perfect. You have calculated the breakeven level, but... if you put the tokens of those two positions on it, they will close at zero. Okay, I think. Now I need to add to this level of the BU as many points as I need to obtain a total profit, equal to the previously calculated - $5.
3. And here is where I get a blockage in my brain. What I do: I take $ 5, divide by the total lot of these two positions (0.1 + 0.2 = 0.3), multiplied by TICK_VALUE
I have 5/(0.3*1.0) = 16.6666 Then I multiply it by Point (0.00016) and add to Breakeven price.
4. Perfect. Takes are transferred there, but it seems to me that the total profit of two Baisers closing at this level is not equal to $5 - it seems to me less. This can be seen from the testing chart. It clearly shows that when one position closes, the balance increase is much greater than when multiple positions are closed at the calculated total take level (you can see these places on the chart by the appearance of the equity line on them). The chart:
Where am I wrong?
I understand that you can print the total profit, but... I want to understand where I could be wrong in my calculations, not the value of the variables. I have printed them already.
I beg your pardon, explain what the mistake is here. I can't figure it out.
even if the position is Sell ?