Topic: Breakeven DemoMt4 execution

re Breakeven DemoMt4 execution.  Don't know how to send you details, but there seems to be important difference between Alpari(US) demo MT4 Journal and FST chart Journal.   FST journal [but not Mt4 journal] is replete with what appear to be BE orders, invariably followed by the entry "Meta-Trader -Alpari(US) failed to exeute order! returned: No error".   In MT4 account history Nothing but [sl]losses, no gains.

Re: Breakeven DemoMt4 execution

Forex Strategy Trader v1.4.4.0
Strategy name: 0823-8_EURUSD_15m_WinDuce259sl280BELngDwnHookCCIoscfallsXitStedy271
Exported on: 8/24/2011 1:15:53 PM

Modified by the strategy generator on 8/23/2011 2:41 PM.
Out of sample testing, percent of OOS bars: 30%
Balance: 5032.85 USD (7/22/2011 5:00 PM  Bar: 1388)

Maximum open lots: 2
Entry lots: 0.01
Adding lots: 0.02
Reducing lots: 2

A same direction signal - Adds to a wining position
An opposite direction signal - Reduces the position
Permanent Stop Loss - 259
Permanent Take Profit - None
Break Even - 280

[Opening Point of the Position]
Ross Hook
     Enter long at a Down Ross hook

[Opening Logic Condition]
Oscillator of CCI
     [ A ]   The Oscillator changes its direction downward
     Smoothing method  -  Simple
     Base price  -  Typical
     First CCI period  -  197
     Second CCI period  -  97
     Use previous bar value  -  Yes

[Closing Point of the Position]
Bar Closing
     Exit the market at the end of the bar
     Base price  -  Close

[Closing Logic Condition]
Steady Bands
     [ a ]   The bar closes above the Upper Band
     Smoothing method  -  Simple
     Base price  -  Open
     MA period  -  1
     Margin in pips  -  225
     Use previous bar value  -  No

[Closing Logic Condition]
Awesome Oscillator
     [ b ]   The AO changes its direction downward
     Smoothing method  -  Simple
     Base price  -  Open
     Slow MA period  -  165
     Fast MA period  -  131
     Level  -  0.0000
     Use previous bar value  -  No

[Closing Logic Condition]
Average True Range
     [ c ]   The ATR crosses the Level line downward
     Smoothing method  -  Simple
     Base price  -  Bar range
     Smoothing period  -  14
     Level [pips]  -  75
     Use previous bar value  -  No

FST version
Library 1.4
Expert 1.6

SL 259
TP None
Break Even 280
"Trade" sometimes produces winners but "Account History" only the produces losers {s]}

Re: Breakeven DemoMt4 execution

serious problem?  am now using FST but there are still serious differences between what the FST chart connected [live] Journal says FST is doing [and Not doing--for example FST strategy adds to Wnner and attempts to modify BreakEven but FST Journal entry says "MT-Alpari(US) failed to execute order! Returned:no error".  FST journal continues to function appropriate to the modify order having been  executed, but the real world MT4 doesn't]
What FST thinks is happening is not what is happening in the real world!
Serious problem? If so, someone PLEASE, PLEASE address!

Re: Breakeven DemoMt4 execution

In the MT4 terminal-experts log it says  "MT4-FST expert 'error in FST OrderSend: no error'"  whenever Journal of attached-chart FST says MT-Alpari "failed to execute order! No error".  If MT4 says there was "no error", why does it fail to execute the FST modification [usually BreakEven?] order???  Or does it just say it  failed to execute??  If it did execute the FST BE-mod, why do No FSB-FST profitable trades result in MT4-profitable trades?

Is this too difficult to explain? Is it just not a problem? Yes-Yes??

Re: Breakeven DemoMt4 execution

"No error" is an error message of MT4. Don't ask me what does it means.

When FST sends order to MT4 and MT4 returns an error message instead of confirmation, FST prints "MT-Alpari(US) failed to execute order!" because the order was properly sent but not executed. After that FST prints what MT4 returns. In your case this is the "No error" reason for the fail.

But these are only messages. FST doesn't keep any status of the trades. It receives at every tick full update of the positions and the account.

So if MT4 returns error for the order, FST will print the message. But if MT4 was successfully executed the order, FST will receive the order details at very next tick and will act accordingly.

I don't know what "No error" means. I have seen it several times but never dig deeper. I do not think it is something serious. Most probably it is not an error at all.

Most important is if the Break Even was properly set. It looks like as Stop Loss in MT4 but it is set at the opening price of the position. If you have added to the position (several open positions in MT4), the expert calculates an average Break Even price for all positions and set SL to each of them at that level.

When Break Even was activated (position was reached the selected profit), expert sets SL at the entry prices. If the market changes direction, it will hit the SL at Break Even price. MT4 journal will show SL activated, but the profit of the position has to be near to 0.

If you want to understand how Break Even works, set a simpler strategy and observe the trades. It's even easier if you make trades manually with different combinations of SL, TP and BE. Automatic trading and manual trading via FST use same orders.

If you notice any issues, please report with screen shots.

Re: Breakeven DemoMt4 execution

Thank you, thank you, Master

If I semi-understood your teachings, when a Winner is required by FST strategy and and a new one found and added, a new break-even price [shown on MT4 as the new S/L price for all open Winners] is calulated based upon an average of the opening prices of all existing Winners. So that S/L price can and does fluctate slightly up-down as new Winners are added.  If all those ["MT4 failed to execute [Popov's] order" even though there was nothing wrong with the order] messages don't bother you, it sure as hell needn't bother me any longer. 

Thank you,Master

Re: Breakeven DemoMt4 execution

When a position (single or aggregate) goes on profit set in Break Even, the Expert (not FST) sets exit at zero profit price. It uses SL orders. Why?
1. Since the position is on profit, the Break Even price is well behind and the pending order for closing this position is Stop Loss. Agree that the name is inaccurate in this case because the positions will be closed at 0.
2. By setting SL orders, FST moves the exit command to the broker. In that case even if FST or MT4 stop, the SL will be executed. This is the safest solution.

There is one special case we have to be careful about. When a new order adds to a position, the resulting position may be on profit or on loss, even if the original was on profit. After modification, the expert calculates the profit of the aggregate position. If the profit is higher than the Break Even trash-hold, the expert modifies SL for all ope positions to match the zero exit. But if the profit is lower, or position is on loss, Expert doesn't set SL at zero since the criteria for BE are not met. This may result to position without SL. For that reason you have to allays use Permanent SL (or some other SL) together with Break Even.

Protection_Max_StopLoss option of the expert also may help. It's the most secure method of protection since it works even if FST has stopped.

8 (edited by jgp 2011-09-27 19:36:12)

Re: Breakeven DemoMt4 execution

So,  the Exit price for the aggegrate position is determined by adding(long) or subtracting(short) the BreakEven amount  [set by FST Strategy Properties] to/from the aggregate "S/L price" for the position shown on the MT4 terminal.
Once price goes above/below that Exit price, the aggregate position is subsequently automatically closed if price attempts to go below(long) or above(short) that Exit price.  Despite your careful attempts to explain how that happens, it is beyond my ken.  I'm having problems getting the Break Even feature to perform on MT4demo-FST the way it performs on FSB and the way it SAYS it will perform on both the FST Strategy and the FSB Strategy.  Am using FSB vers and FST vers  library vers 1.4, expert vers 1.7 --- what appears to happen on FSB  is that all pertinent trades are closed at a break even profit when the profit falls back to the break even set point, but on FST the pertinent trades are closed out at zero profit when the profit falls back to wherever[?]  So I'm getting a lot of Stop Losses and a bunch of zero profits and the rare Take Profit.  Have the same problem whether trading .01, .02 or higher lot sizes.  Example USDCHF Winner, Reduce, 424SL, 874TP, 216 BE. 
If the break even function worked as well on MT4-FST like it does on FSB, it would be a wonderful thing!!!

Re: Breakeven DemoMt4 execution

So why am I getting in MT4 account all these Zero Profit lines? shouldn't I be getting small BE profit lines, instead?


Re: Breakeven DemoMt4 execution

So,  when the aggregate position reaches the set break-even price, the FST essentially modifies each original order, resetting the stop-loss accordingly.  And when that break-even price  is encountered again, each modified order will be closed at essentially  zero 'Profit'.  That's where all those zero profit transactions come from.  But where does the breakeven profit that accrued from the original orders appear on the account history?