Hi I do have multiple orders of the exact same pair same direction available. Perhaps it's some configurations? May:e u can try it in the tester to determine if orders can be opened
Hi I do have multiple orders of the exact same pair same direction available. Perhaps it's some configurations? May:e u can try it in the tester to determine if orders can be opened
Nah, you do not do the rounding; just at ordersend function you normalize the calculated lot.
Thank you KashifNawaz to your participation!
I'd be glad that we would trade in Foreign Exchange in precisely the same time, because we understand the law in order to win, somebody must cover it ...
From your beautiful example, I'd do the next with the SnowBall method:
# After my technical analysis, I guess the tendency is going down
A cycle consists of 4 orders.
Cycle 1
- in level 1, buy and sell 1 lot
(if the tendency goes up, I shut both orders with -0 result)
- in trend direction with your 300 pips grid, constantly order 1 lot per grid (4 times, on level 1, 2, 3 and 4)
- in exit level 5 we've (300 * 4 300 * 3 300 * 2 300 = 3.000 pips)
- the market order loses -300 * 4 = -1.200 pips
- that the result is 3.000 - 1.200 = 1.800 pips
cycle 2
- in level 6, buy and sell 1 lot
- compute as previously having a grid of 350 pips till level 10
- that the result is 3.500 - 1.400 = 2.100 pips
For more complied alterations may not be so great, you have to test that ...
no
is for rounding of lot 0.062, 01 the third sign is not in lots
0.01*1.2 = 0.01
0.01*1.2 = 0.01
0.01*1.2 = 0.01
0.01*1.2 = 0.01
0.01*1.2 = 0.01
0.01*1.2 = 0.01
0.01*1.2 = 0.01
0.01*1.2 = 0.01
It's math and rounding.
Whether the price is down or up, first lot size is same for buy and sell.
Okay
Price dw
Buy 0.01_________________Sell 0.01
0.010*1.2 = 0.012 ______0.01 0.01 = 0.02
0.012*1.2 = 0.014 ______0.02 0.01 = 0.03
0.014*1.2 = 0.017 ______0.03 0.01 = 0.04
0.017*1.2 = 0.021 ______0.04 0.01 = 0.05
0.021*1.2 = 0.025 ______0.05 0.01 = 0.06
0.025*1.2 = 0.030 ______0.06 0.01 = 0.07
0.030*1.2 = 0.036 ______0.07 0.01 = 0.08
0.036*1.2 = 0.043 ______0.08 0.01 = 0.09
0.043*1.2 = 0.052 ______0.09 0.01 = 0.10
0.052*1.2 = 0.062 ______0.10 0.01 = 0.11
0.062*1.2 = 0.074 ______0.11 0.01 = 0.12
0.074*1.2 = 0.089 ______0.12 0.01 = 0.13
0.089*1.2 = 0.107 ______0.13 0.01 = 0.14
0.107*1.2 = 0.128 ______0.14 0.01 = 0.15
Close BUY SELL together. No residual. No balance.
Price for Close all is Average price of BUY.
The aforementioned pattern is good for trending market, if the daily price movement is over 60 pips.
When the price turn back, say after 30 pips move, take small reduction and shut the entire thing, or you can maintain both BUY and SELL places available until the market trends.
BUY - 0.01 / 1.23602 ------ SELL - 0.01 / 1.23602
BUY - 0.01 / 1.23702
BUY - 0.01 / 1.23802
Average Price - 1.23752
How did you compute that Awerage Price.
It is same formula.
(0.01*1.23602) (0.01*1.23702) (0.01*1.23802)-(0.01*1.23602)/(0.01 0.01 0.01-0.01)
Calculated Average Price - 1.23752
BE = [(P1 * B1) (P2 * B1) (P3 * B1) - (P1 * S1)] / (B1 B1 B1 - S1)
I have the excuse after looking at the enlarged image.
(it's true that I know gradually, rather I forget quickly!)
It is an error message! Voldemar forgot to save . Mqh file in the folder.
Formula
Awerage price = (OpenPrice1*Lot1 OpenPrice2*Lot2 OpenPrice I * Lot I)/(Lot1 Lot2 Lot I);
Awerage price = 0
(Op1 * L1 Op2*L2 Opi*Li)/(L1 L2 Li)=0 Profit = 0
Swingman,
BE formulation you have mentioned is same as to what Voldermar stated in his video.
BE = [(P1 * B1) (P2 * B1) (P3 * B1) - (P1 * S1)] / (B1 B1 B1 - S1)
This formulation gives us the breakeven or produces complete 0.
1. What you are suggesting is we open 1 buy 1 market.
2. If the price moves in BUY management, we build the grid on buy direction and move the TP (for all BUY orders)/ SL(for your market order) into Breakeven price/ AweragePrice (Voldermar)
3. If price moves up 5 degrees in grid, we shut all orders. - 5 BUY orders 1 Economy Order. - Grid (Network Orders) makes Profit
4. And when price moves down, All order shut at rest.
This might work, we building on trend management, and remainder we closing on break even - or little loss.
I was saying exactly the Exact Same on BUY SELL alternative. However, you have made it more easy for all to understand.
Lets try these 4 steps into code and examine the EA. As we've got AweragePrice/Breakeven Price Calculation
notice: Average is spelt Awerage to match what is used from the code by Voldermar.