Hi Funyoo,
I was wonder what is the difference if i use 1st vForce v1 to open 2windows (1buy only & 1 sell only) with difference magic number and another one with 2 windows difference magic number?![]()
Hi Funyoo,
I was wonder what is the difference if i use 1st vForce v1 to open 2windows (1buy only & 1 sell only) with difference magic number and another one with 2 windows difference magic number?![]()
Trading forex risk disclaimer. Exclusive EAs in the Elite section.
Originally Posted by RConcu
Post #462
Hi Maxim, hi funyoo,
great work, great EA. I like it.
i found the reason why the EA does no short orders.
Put in the code in red:
int openSellOrder( int barIndex )
{
double stopLoss = calculateSellStopLoss( barIndex ),
takeProfit = calculateSellTakeProfit( barIndex ),
orderOpenPrice,
// The order size of both orders
orderSize,
// order1Size
order1Size = g_order1Size,
// order2Size
order2Size = g_order2Size;
Hi Guys
I've tried Funyoo's version 202 and it doesn't seem profitable. Maxim's version 2_04 is profitable on the long trades but doesn't make short trades. I've adjusted the code as advised in the above two posts but 2_04 is still only trading long.
Can anybody help?
Cheers.
OK, here is my refactoring of the vForce Like EA, based on Maxim's code, but with the selling bug fixed, and a few others.
It makes money buying, it makes money selling... it's impressive!
However, beware the Head and Shoulders Reversal Pattern, as this algorithm bets wrong on that, buying the left shoulder, losing on the right. The proper StopLoss setting should help there, since it will now sell the downside and start making money again if a down trend develops.
BE CAREFUL!!
BTW, I've been using it on EURUSD M5 or M15 chart. Works with 5 digit and 4 digit brokers.
MM
Hi Music Man
Thank you for this new variation. A couple of queries:
1. The TS doesn't appear to work. All orders are initiated with a TP (see extract of test below):
59 2009.02.02 01:30 t/p 11 0.08 1.2720 1.2868 1.2720 12.00 10057.00
60 2009.02.02 01:30 t/p 12 0.02 1.2720 1.2868 1.2720 3.00 10060.00
61 2009.02.02 03:40 t/p 3 0.08 1.2714 1.2860 1.2714 12.00 10072.00
62 2009.02.02 03:40 t/p 4 0.02 1.2714 1.2860 1.2714 3.00 10075.00
63 2009.02.02 03:51 t/p 21 0.08 1.2713 1.2862 1.2713 12.00 10087.00
64 2009.02.02 03:51 t/p 22 0.02 1.2713 1.2862 1.2713 3.00 10090.00
65 2009.02.02 03:51 t/p 1 0.08 1.2712 1.2854 1.2712 12.00 10102.00
66 2009.02.02 03:51 t/p 2 0.02 1.2712 1.2854 1.2712 3.00 10105.00
67 2009.02.02 03:51 t/p 19 0.08 1.2711 1.2862 1.2711 12.00 10117.00
68 2009.02.02 03:51 t/p 20 0.02 1.2711 1.2862 1.2711 3.00 10120.00
69 2009.02.02 06:55 t/p 23 0.08 1.2710 1.2853 1.2710 12.00 10132.00
70 2009.02.02 06:55 t/p 24 0.02 1.2710 1.2853 1.2710 3.00 10135.00
71 2009.02.02 06:59 t/p 15 0.08 1.2709 1.2849 1.2709 12.00 10147.00
72 2009.02.02 06:59 t/p 16 0.02 1.2709 1.2849 1.2709 3.00 10150.00
2. Also, at one stage during my backtest, the green equity line shot up more than 10% over the balance line before shooting back down a few trades later. I don't understand this, if fixed TPs are being loaded on each trade then the majority of increases in equity should be captured. Can anybody explain? (I'm afraid I haven't worked out how to copy and paste an image in the posts!).
Many thanks.
Yes, the dynamic order management features seem to have gotten lost in the mix somewhere. Let me see if I understand what it is supposed to do, then we will see if I can get it to work in a partially undocumented language with no source-code debugger.
1) Every signal places 2 orders, the relative size of which is dictated by EA params (defaulted to 80%/20% of Lots).
2) Order 1 gets a TP value according to EA params. Order 2 gets no TP.
3) Order 2 has its TS dynamically modified to follow behind as the order gets into profit.
Although I don't see it in the original, I think we also ought to add the following:
4) Order 2 dynamic TS modification does not proceed until the order has exceeded a specific profit amount (or perhaps state this in pips).
Does that about sum up what the TS feature ought to do?
I am not mentioning the formula for computing the TS on purpose, as the original ATR-based approach is a given, I guess.
MM
Yes, that's the theory. But what is actually happening is that order 2 is given the same TP as order one, so the TS, if it exists, never gets a chance to show itself.
What you are suggesting is correct, but we first of all need to prevent order 2 from loading a TP.
Thanks for your interest.
Paul
If that is the problem, I think we need to modify the OrderSend parameter for ticket2 (sell or buy).
If you look at the current openSellOrder subfunction as example:
That is where the TP is set even for order #2. What we should do is to remove TP from order #2, like this:Code:ticket1 = OrderSend( instrument, OP_SELLSTOP, g_order1Size, orderOpenPrice, Slippage, stopLoss, takeProfit, EAName, Magic1, expire, g_colorShort ); ... ticket2 = OrderSend( instrument, OP_SELLSTOP, g_order2Size, orderOpenPrice, Slippage, stopLoss, takeProfit, EAName, Magic2, expire, g_colorShort );
Same must be done to openBuyOrder subfunction.Code:ticket1 = OrderSend( instrument, OP_SELLSTOP, g_order1Size, orderOpenPrice, Slippage, stopLoss, takeProfit, EAName, Magic1, expire, g_colorShort ); ... ticket2 = OrderSend( instrument, OP_SELLSTOP, g_order2Size, orderOpenPrice, Slippage, stopLoss, 0, EAName, Magic2, expire, g_colorShort );
One more thing, why is the Expiration set to 0? If not mistaken, vforce has expiration so that any pending orders that are not executed within the specified timeframe will be deleted. Any reason why expiration rule not followed now?
Thanx.
-RJ1-
>>expiration
I believe someone disabled it because it was causing runtime errors. I haven't addressed that feature as of yet.
At some point soon, I will see if I can get it to work. I hate having all those old pending orders laying around when the market moves away from them.
MM
Hi Funyoo,
I'm currently testing on VForce v1.2.
When i analise the buy and sell from the chart i noticed that vForce usually will place a trade near to peak or valley of the trend and hanging there for another new peak or valley.
Can we modify the code so that it will trade reverse order so that it will place a sell on peak and buy on the valley?