forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Forex Strategy Builder Professional → Strange behaviour of MA Strategy in FSB (Builder vs. Trader)

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 12

Topic: Strange behaviour of MA Strategy in FSB (Builder vs. Trader)

Input parameters of my DAX strategy traded at FXCM contain 2 slots of Moving Average with identical settings.
1st Moving Average (in screenshot): The bar opens above Moving Average after opening below it
2nd Moving Average (in screenshot): Moving Average rises
Opening Point of the Position is: Bar Opening

Recently I noticed faulty behaviour of trades based on these MAs - in one case in Trader, in another case in Builder:

Case 1:
(Left side - Trader, Right side - Builder)
Fault in Trader: Short entry at the Day opening was not executed.
In Builder was the entry executed correctly.

Post's attachments

ma1_web.jpg 99.99 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

2 (edited by bold 2016-09-11 12:33:46)

Re: Strange behaviour of MA Strategy in FSB (Builder vs. Trader)

Case 2:
(Left side - Trader, Right side - Builder)
Fault in Builder: Long Entry at Bar 0 was not executed, because "Moving Average rises" slot indicates "No long entry". I checked MA values at previous bars: bar-2: 10694,0  bar-1: 10694,3  bar0: 10694,5 => MA rises in fact!?


I have no idea what can make the differencies/errors?

Post's attachments

ma2_web.jpg 98.98 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Strange behaviour of MA Strategy in FSB (Builder vs. Trader)

Mr.Popov, have you noticed this issue?

Re: Strange behaviour of MA Strategy in FSB (Builder vs. Trader)

I see 2 decimal digits of the prices at the left chart but no digits a the right side.
Is it possible to have wrong settings in the builder?  Digits = 2 vs Digits = 0 for the trader.

FSB Pro uses the Digits parameter for rounding indicators plotted on the price chart (as Moving Average).

Re: Strange behaviour of MA Strategy in FSB (Builder vs. Trader)

We have already discussed the decimals issue at FXCM earlier here:

http://forexsb.com/forum/topic/5794/fxc … ted-by-fsb/

Re: Strange behaviour of MA Strategy in FSB (Builder vs. Trader)

Hi Mr. Popov,
is there any progress in solving this confusing issue?
I had to stop trading my Strategies, because FSB Pro behaves randomly at the moment and I cannot rely neither on Builder part (false MA calculation) nor on Trader part (ambigious Day Opening interpretation).
Either I have an incorrect settings somhere (but where?) or there is a bug in the software.

Re: Strange behaviour of MA Strategy in FSB (Builder vs. Trader)

There is no bug. The settings in builder and trader are different.
The program has strict rules for rounding the value as per the symbol digits.

When there is difference in the settings and the history data, it is possible to have difference between the trades and the backtest.

Re: Strange behaviour of MA Strategy in FSB (Builder vs. Trader)

I am sorry, but I am always confused.
Your explanation is too vague. Can you please explain in more detail?


And then please clarify once more the situation of the Case 2 (see above Post #2) and compare the following facts:

Fact 1: In Indicator Chart -  MA values at previous bars are:
bar-2: 10694,0 
bar-1: 10694,3 
bar0: 10694,5 =>
thus MA rises in fact!?

Fact 2: Moving Average (rises) - Is long entry allowed: NO . (Why "NO", when the chart shows that MA rises?!)


Then: Either Fact 1 is truth or Fact 2 is truth - which one?


In my opinion the MA calculation shown in the chart is correct (Fact 1 = MA rises) - also for the reason, that both Builder and Trader show identical MA values of the 08:45 candle = 10694,5 .
So that difference in rounding is probably not the problem.

That means that the trade status (Fact 2) is mistakenly set to "NO".

There must be a bug!

Re: Strange behaviour of MA Strategy in FSB (Builder vs. Trader)

Fact 1: In Indicator Chart -  MA values at previous bars are:
bar-2: 10694,0 
bar-1: 10694,3 
bar0: 10694,5 =>
thus MA rises in fact!?
Fact 2: Moving Average (rises) - Is long entry allowed: NO . (Why "NO", when the chart shows that MA rises?!)

I already answered to that.
1. The indicators plotted on the main chart determines a price value.
2. The prices are calculated with a precision that correspond to your settings (digits)
3. Because the digits = 0, the MA values for the calculations are as follows:

bar - 2: 10694 
bar - 1: 10694 
bar - 0: 10694

4. MA Values are equal for the last 3 bars and FSB Pro doesn't rise a signal.


---

You can very easily check if this is the actual reason or not. Simply set Digits = 2 for that symbol. It is not necessary to change the data files.

In my opinion the MA calculation shown in the chart is correct (Fact 1 = MA rises) - also for the reason, that both Builder and Trader show identical MA values of the 08:45 candle = 10694,5 .

The charts show indicator values with one digit more than the values used in the signals calculations. This is done in order to see if the values are rounded correctly.

In your case the difference in the values is at the 6th meaningful digit.  This is equal to 0.009 % change. This is a very small change in the indicator and must be ignored because in the other case the strategies will be vulnerable.

Re: Strange behaviour of MA Strategy in FSB (Builder vs. Trader)

You are right - when I set Digit = 2, trades in Builder start to behave more or less identically with the Trader.

What I still do not understand is the behaviour of indicator values. You wrote:
" ... The charts show indicator values with one digit more than the values used in the signals calculations. This is done in order to see if the values are rounded correctly."
Thus, indicator values should now show 3 decimal digits. But they always show only one digit, like when Digit was set to 0 earlier ?!


But I still have a more important request now:
How can I set Trader so that the rounding behaves identically with the Builder, when it was set to 0?
I have 2 main reasons for this request:
1. My strategy was optimized (not over-optimized) with the earlier setting Digit = 0 in Builder, before FXCM changed numbering from 0 digit to 2 digits in the beginning of 2016. I want Trader to accept this earlier optimized strategy (with Digit = 0).
2. In the past I created & generated & optimized many thousands of individual strategies, still when Digit = 0 was correct.
It would require a huge effort and a lot of time now, when I now had to manually edit every individual strategy, so that they conform to the new Digit = 2 environment. Therefore it would help me much, when I could "force" the Trader to behave like when Builder was set Digit = 0.
An alternative way would be, if you could advise how to automatically transform all my strategies in Builder to the new Digit = 2 environment. Is this possible?

Re: Strange behaviour of MA Strategy in FSB (Builder vs. Trader)

The strategy is same. The behaviour of the trade will not be changed.
I do not expect also a huge difference in the backtest result. If such difference exists, it means the strategy is too sensitive and probably over-optimized.


It is a trader's responsibility to provide backtetsing environment to his trading environment.

You cannot force the trader to do dangerous things like trading in a false environment. The whole problem comes form FSXCM or from MetaTrader that provide wrong settings.

Please ask them.

You can also change the Bridge expert to provide the settings you want. However, this is dangerous and must be made carefully. 

Open the Bridge and change line 1965
from

MarketInfo(symbol,MODE_DIGITS),

to

0

It must look something like:
http://s12.postimg.org/x1ywjxfvh/screenshot_13.png

Please note that the above change will break all other symbols.

Re: Strange behaviour of MA Strategy in FSB (Builder vs. Trader)

Hi,
This week I played with your interesting idea of editing the Bridge code for my DAX strategies at FXCM.
Unfortunately, I could not unambigiously confirm that it works, because I found discrepancies betweeen Builder and Trader in another indicators (e.g. Williams% Range). I was also not sure, if your supposed change should:
1. only help indicator values calculations in Trader to be identical with Builder or
2. also to be used in Trader for values related with price without additional 00 behind.

I have at least found out that even after changing the Bridge code, I had always to add 00 behind all values connected with price. Unfortunately, this fact disqualifies me from using nearly all indicators where price is a parameter, like SL, TP, Trailing stop, Vertical shift, and other indicators using these parameters (like Trailing Stop Limit, etc.) - both in Trader and in Builder.

(To remember you:
Until 2016 DAX values at FXCM were like 9655, 10834, etc.
Now they are 9655.23, 10834.07, etc.)

An example:
Until 2016, when I wanted to use Trailing SL of 650 DAX points, I simply entered the number 650 in the Trailing SL indicator.
Now, with decimal pricing, I need to type value 65000, which is not possible.

Can you please increase the limit of above mentioned parameters (and all related indicators) at least up to 100000, or better up to 200000 in the next release of FSB Pro?
I believe, not only myself would appreciate it.

Posts: 12

Pages 1

You must login or register to post a reply

Forex Software → Forex Strategy Builder Professional → Strange behaviour of MA Strategy in FSB (Builder vs. Trader)

Similar topics in this forum