"If you want something go down, let it go up first" Lao-Tzu
Overlay in MetaTrader 23 replies
Overlay 2 replies
Futures and Forex charting package with overlay 0 replies
Overlay Indicators - I've seen this lots of times but..... 3 replies
Histogram Overlay 1 reply
Dislikedfor (int l_pos_16 = 0; l_pos_16 < OrdersTotal(); l_pos_16++) doesn't work correctly...the loop has to be the other way round:
for (int l_pos_16 = OrdersTotal()-1; l_pos_16>=0; l_pos_16--)
Imagine you have two open orders that are to be closed
These orders carry the index 0 and 1
If you close the first order (index=0) the remaining order would automatically be assigned index=0...so your loop with l_pos_16=1 wouldn't get that order and it would stay openIgnored
DislikedDear Mahanxiong, maybe I should explain better...I told you already that you are right...but the system works exactly buying and selling in the meantime the same pair EG, perfectly hedged, but not directly, beside the correlated pairs EU and GU. And this is not exactly the same.Ignored
DislikedReason of Big DD
If you run this EA for a time period, say few days later. You will found a lot of Big DD in the open trade. One of the reason I know is we use the wrong ADR Ratio in the second couple pair. but this will ONLY apply to the 2 pair currency are highly correlated condition.Ignored
DislikedSorry Paulss, but in this way the trades are unmbalanced. The ADR value should be the same for each pair of the couple. in the original settings the EU has an ADR slightly higher than GU so the lots are calculated in a 0.8 ratio:
Buy 1 lot EU
Sell 0.8 lots GU
Sell 1 lot EU
Buy 0.8 lots GU
in this way the hedge is balanced.Ignored
DislikedAnd code close All....
[code]void CloseAll() {
double l_ask_0;
double l_bid_8;
for (int l_pos_16 = 0; l_pos_16 < OrdersTotal(); l_pos_16++) {
if (OrderSelect(l_pos_16, SELECT_BY_POS, MODE_TRADES) == TRUE) {
if (OrderSymbol() == Pair1 || OrderSymbol() == Pair2 && (OrderMagicNumber() >= Magic && OrderMagicNumber() <= Magic + 500) && OrderCloseTime() == 0) {
l_ask_0 = MarketInfo(OrderSymbol(), MODE_ASK);
l_bid_8 = MarketInfo(OrderSymbol(), MODE_BID);
if (OrderType() == OP_BUY) {...Ignored
Dislikedyes...u right..i show sample only..
Can u make modify this EA for check orphans orders...?Ignored
DislikedJust so you all know, for my manual strategy, I use equal lots of EU and GU, so 1.0 buy on one 1.0 sell on the other, because a pip is $1 on each.Ignored
DislikedYes, the v2 on first post still lack return(Ticket); on SendSell() routine
Fixed by myself
skipperIgnored
Dislikedsimi, if it is same, it is same in every aspects.
very simple way to find out:
put up a demo account, buy 0.1 lot eu, sell 0.08 lot gu; then sell 0.1 lot eg.
this is a perfect hedge (with a few cents unmatched).
if they are different, you'll see a loss or profit. but you won't be able to see it!
i really wish you can show me a proof that "they are different".Ignored
DislikedI've done exactly this. See the screenshot. The red lines are the ask line, so one can see the spreads in the pairs (it's around 3 pips for EU and around 4 pips for GU and EG). So combined when I opened the trades there was a starting 11 USD loss due to the spreads, now it's in -21 USD. So something is not working, only 45 mins elapsed since I opened the trades and there is a loss already (it's keep growing as I'm typing this)..Ignored
DislikedI've done exactly this. See the screenshot. The red lines are the ask line, so one can see the spreads in the pairs (it's around 3 pips for EU and around 4 pips for GU and EG). So combined when I opened the trades there was a starting 11 USD loss due to the spreads, now it's in -21 USD. So something is not working, only 45 mins elapsed since I opened the trades and there is a loss already (it's keep growing as I'm typing this).
On another chart (and another broker) I keep tracking the gap between EU/GU with indicators and the simple overlay with...Ignored
DislikedDB - here is a correction to the code fixing SendSell(...) regarding return(Ticket). Sorry for the oversight.
KingHighIgnored
DislikedThe equity curves aren't looking that bad, if there weren't the ugly spikesIgnored
DislikedThe equity curves aren't looking that bad, if there weren't the ugly spikes
Depending on when you started, a downspike could lead to a 50+% DD of your starting balance.
The test was eurusd vs. gbpusd with a layer distance of 50pips (average down only) and a basket takeprofit of $100
Initial balance $10K and 0.1 lots for both pairs - year to date
The upper graph is showing long eurusd/short gbpusd and the lower the other way roundIgnored
Dislikedit's "my own" EA but based on the same grid principle
There's no entry criteria so the EA opens the hedge as soon as it's started
After TP for a basket is reached the next hedge is opened directly after closure...and here's the first point that doesn't make sense
why close the basket if you're afterwards going to trade the same direction anyway
missing the piece of the puzzle...Ignored