Re: Which value does PBV take in LTF settings?

Further to my last, would it not make sense to keep the auto setting of use previous bar (as it currently is) but just change the LTF to control just the entry conditions; BUT leave the trigger to the current timeframe.

eg dealing with the M5 charts, you have a strat when the daily 9 crosses over the 21 daily EMA.  So you have LTF option ticked and set to D1, and parameters are 9 and 21 (even though you are on the 5 minute TF).

The crossover condition could happen anytime during the day.  Let's assume it happens at 14:28.  Assuming you have bar opening (use previous bar ticked), then at 14:29 and 59.99 seconds when the 5 minute bar closes, as long as the MAs have not uncrossed in those 2 minutes, then the trade is triggered.

Under the current LTF system it seems (from the posts above) that you can't do that - you have to enter just once a day.
If that is the case then surely by keeping the auto setting of use previous bar, as it is in the normal retail version, but alter the logic slightly so that when using LFT it only uses the longer timeframe for the condition parameters* and not for the entry candle, then the FSB pro backtesting would be reliable and the LTF option would make more sense.

*ie it does the period calculation for you and converts your 9 and 21 into whatever your timeframe you're looking at.  It would mean that you would have to calculate every 5 minutes (if using the M5) and so your MA strategy based on daily crosses would be triggered no later than 5 minutes later.

If I have got it wrong Popov, please forgive me; I have looked at a fair amount of the videos and Wiki but I may have missed the point!

Finally thank you Popov for all your hard work over the years, and Hannahis for bringing this topic up.

Re: Which value does PBV take in LTF settings?

The ultimate purpose of FSB is to provide a reliable backtesting algorithm.

Lets see your example above - MA Crossover on a Daily chart.
Hannah wants to trade on a short period - M1 or M5 on Crossover. If we watch a live chart and both MAs are close enough, they may crossover up and down several times during a day opening and closing several positions. However, when the day is over and we see our chart we will notice that ether there were one crossover or no crossover at all. It is not possible MAs on D1 chart to make more than one crossover during a single D1 bar. And here is the contradiction: we may have several trades during a live trading session in a single day, but the backtester can produce maximum one trade (or no trades at all). If we think such behaviour is acceptable we admit that the all the FSB functions as backtesting,  optimization, strategy analysis ... are pointless.

My assumption for the fx trading is that:
- if a strategy shows a bad backtesting result, it will fail on the market,
- if a strategy shows a good backtesting result and passes all robustness tests and analysis, it may win on the market.

Without a backtest we have no idea how a strategy will perform on the market and what we can expect.

Re: Which value does PBV take in LTF settings?

There are 2 possible types of paths, traders take to develop profitable EA (of cos there can be more than just 2).

1. Via a sound trading theoretical framework, whereby the strength of the EA's performance rest on the soundness of it's trading theory.  This path is taken by traders who know what it takes to make a profitable EA.  They approach the use of FSB with an end in mind.  They know how to reach the end goal and the steps to be taken.  The key is to find a software that will do exactly what these traders want.  These traders already found and formulated their strategies, they just need a software to carry it out (without the need to learn extra computing language #C etc). 

Trader who develop profitable EA via this path would want a system or tools that can "replicate" his/her instructions as close as possible to what is "authentic" to the trading theory.  Hence, the importance and priority is on how well the system or software can "follow" the instruction or conditions input as exactly as what the trader wants it to be (without the interference of PBV).  Back testing result take the secondary importance. 

2.  For those who are "clueless" about what it takes to make a winning formula.  Back testing is of higher importance.  Since these traders don't know what "clicks and what doesn't", they haven't found or developed their own profitable trading theory yet and hence, they then have to rely on the immediate back test results that FSB can offer to "guide" them to search for profitable formula or strategies.  For these types of traders, reliable back testing is of higher importance.  These traders do not know what to begin with and hence, FSB's immediate back testing results, Generator and Optimizer are excellent toots for them to start their search for profitable strategies.


It is important for FSB to recognize and attract traders of different types and levels of trading experience, it need to understand the mentality of the 2 above contrasting traders' preferences.  And cater to their needs according.  And since FSB has the capacity to offer 2 versions.  Then why should it restrict itself to cater to the 2nd group of traders at the expense of losing the 1st type of traders?  We all can read disclaimers.  Just highlight it to those who want to use UPBV and keep them aware of it's implication of the "wrong" back testing results.  I am totally fine with it (at least it's my choice).  I can live with it than to be forced to work with PBV, that's worst (that is no choice at all).

Re: Which value does PBV take in LTF settings?

trader1234 wrote:

Further to my last, would it not make sense to keep the auto setting of use previous bar (as it currently is) but just change the LTF to control just the entry conditions; BUT leave the trigger to the current timeframe.

eg dealing with the M5 charts, you have a strat when the daily 9 crosses over the 21 daily EMA.  So you have LTF option ticked and set to D1, and parameters are 9 and 21 (even though you are on the 5 minute TF).

The crossover condition could happen anytime during the day.  Let's assume it happens at 14:28.  Assuming you have bar opening (use previous bar ticked), then at 14:29 and 59.99 seconds when the 5 minute bar closes, as long as the MAs have not uncrossed in those 2 minutes, then the trade is triggered.

Under the current LTF system it seems (from the posts above) that you can't do that - you have to enter just once a day.
If that is the case then surely by keeping the auto setting of use previous bar, as it is in the normal retail version, but alter the logic slightly so that when using LFT it only uses the longer timeframe for the condition parameters* and not for the entry candle, then the FSB pro backtesting would be reliable and the LTF option would make more sense.

*ie it does the period calculation for you and converts your 9 and 21 into whatever your timeframe you're looking at.  It would mean that you would have to calculate every 5 minutes (if using the M5) and so your MA strategy based on daily crosses would be triggered no later than 5 minutes later.

If I have got it wrong Popov, please forgive me; I have looked at a fair amount of the videos and Wiki but I may have missed the point!

Finally thank you Popov for all your hard work over the years, and Hannahis for bringing this topic up.

Hi Trader1234,

I'm so glad you took some time to study and understand the implications of PBV and realised it "defeats" the purpose of using 1min or 5 min time frame with LTF options being "restricted" to the use of LTF's Previous Bar value.  In fact, using the LTF's previous bar value would mean that D1 already crossed in the previous day and then the next day, your EA will be fulfilled, ie. if you use D1 cross over, the trade will be triggered the next day because the previous bar value used reflect yesterday's results.  You would have missed yesterday's breakout already and by the time you entered today, the trend would probably turning around or you missed a couple thousand pips and left with little and not forgetting that not only will you enter late, you will exit late too (if you also use D1 as your closing conditions).  So from a winning strategy, PBV's style of execution will turn your profitable EA into a losing one.  What an irony.

Yes, what you are requesting is what I'm been requesting for, ie. UPBV version.  Whereby the use of LTF is to control the entry conditions (but don't use their Previous bar values for calculations and execution).  but to use 1 Min or the default time frame's bar close instead.

What a relief, finally there is at least someone out there who think through about the implication of PBV and examine how it would have affect their trading strategy's implementation/execution of trades.  My plead has not fallen on deaf ears. 

Thanks Trader1234, appreciate your contribution to this discussion.  Otherwise, the silence of the majority would make me think that most users either closed up their minds or have been using FSB "blindly" without thinking through how PBV work and it's implication on our EA's performance/results.

If one were to think through carefully and compare between the 2 versions.  It is a whole lot easier to develop winning formula via UPBV than with PBV version.  Input your conditions in UPBV is so straight forward.  All the LTF is using 1 current price level.  Whereas, if I were to use PBV version, I have to think 1 step ahead to preempt the implications of LTF's Previous Bar values.  Eg with UPBV, I input D1 crossover as the way I wanted but with PBV, I need to think about what kind of conditions D1 1 bar before it cross over (since the previous bar will be used instead of the current price value).

Honestly, with the need to consider all the previous bar conditions of all the LTF I'm going to use in my opening/closing conditions, it is extremely difficult and challenging to use PBV version.  Whereas for UPBV, I don't have to second guess the settings/conditions I want to use.  It is straight forward.  UPBV will execute exactly the way I wanted...no more guess work, no more time gap difference in the various price values being used for my indicators' LTF calculation.

Re: Which value does PBV take in LTF settings?

Hi Trader1234

Below is taken from another of my discussion thread "Hannah's Trading Tip" http://forexsb.com/forum/post/35503/#p35503


BE MINDFUL of PBV Function

Dear all, since in this discussion thread, I mainly highlight the use of 1 min time frame and the use of LTF features.  I think it is important to highlight an important information for users to be mindful of the PBV features and it's implication so that when we input the opening/closing conditions.  We will then be able to decide carefully what parameters to use for the LTF and what kind of indicators or setting we need to use in order to take note we are utilizing previous bar values and not current bar values for those in LTF (higher time frame).


Here is an example of the time difference and what we need to be mindful of the implication of using PBV.
With PBV, these are the different values and time difference my EA has to use to do it's indicators' calculation.

At 23:58, my EA will use these following values from these different time frames.

1min 23:58 (current values taken)
5min Time Frame will use values taken at 23:55 (values, taken 3 min ago)
15min Time Frame will use values taken at 23:45 (13min ago)
30min Time Frame will use values taken at 23:30 (28min ago)
H1      Time Frame will use values taken at 23:00 (58min ago)
H4      Time Frame will use values taken at 20:00 (3 hrs 58min ago)
D1      Time Frame will use values taken at 00:00 (23hrs 58min ago)


Of course the time difference varies all the time because each time frame has it's own Previous Bar Value interval, eg. H4 with 4 hours interval etc.  For eg at 00:00 all the time frame will be using the same current price value.
So bearing in mind the possible time difference and the implication that your EA will be utilizing different prices to do it's indicators calculation for different LTF instead of 1 current price value.  You need to choose the setting or LTF what gives you the least difference.


So for scalper mode EA, using LTF H4's trend to determine your scalper trend direction (eg enter Long only base on H4's trend, wouldn't be the most appropriate choice because based on Previous Bar value of H4, there is a "discrepancy" time gap between current trend and H4's PBV trend that may be taken more than 3 hours ago (but also can be lesser, it is never consistent, in this time gap difference measurement).


Unless, it is a long trend that also coincide with D1's direction, then such trend would last a couple of days, so the impact is less "damaging" due to wrong entries.  However, imagine, between this time gap (3 hours difference), the trend has changed but because your EA is still taking H4's previous bar value that still hasn't "reflected" such change, your scalper mode EA will continue to open in the wrong direction.


Hence, from my own personal experimentation, H1 or less time frame are more suitable for scalper mode EA.  If you looked at the time gap difference illustrated above, you will see that the difference is smaller and hence, the price values use are likely less difference from the current price value (providing there isn't huge market fluctuation during these time lapse.
Similar for other modes or types of EA.  Do bear in mind the time difference/gap and thus when you input your opening/closing conditions...you have to think one step ahead (to counter the effect of using PBV).  For example, instead of using "cross over" for higher time frame, you may want to consider using divergence instead or falling etc.  In other words, you have to ask yourself, how would you describe or input the setting/conditions that best reflect a H4 indicator that is 1 bar away from cross over (how does the previous bar would "look" like before it cross over in the next bar?).  Yes, some guessing game is involved here (and best of luck) because you never know whether at the next bar, a cross over will really happen or not, cos for H4 indicators, often the 2 curves will be very close (almost going to "touch" each for many bars before it finally cross over.  Hence if we try to be 1 step ahead, we may ended up committing to trade "prematurely" and ended up holding onto a "wrong" position for a long time before the trend finally changed.


So the "safer" option is to use "higher than" option in LTF and use lower time frame to eliminate those contradicting trend signal (especially when trend has changed in H1 and M30 and lower but H4 previous bar value is still using previous trend direction).  While you may have eliminate these contradicting signals, you also eliminated/missed the opportunity to enter into the market to capitalize on the trend change because we need to wait till H4's previous bar to register the change in trend and to "agree" with the rest of the lower time frame trend signals.  Of cos, the other way to go about is to use lower time frame to avoid or reduce such "delayed respond" or time difference (like the example I illustrated above with the EA at 23:58 etc).


Now I realised why my very old batch of EA did very well (cos they used "higher than") and some of my current batch EA with "cross over" features didn't do as well as those older batches.  But the problem I have with older batches was, I encountered a lot of "error of entries" because the of the time gap issue, H4 previous "higher than" is no longer valid for the current trend change.  As a result, if my closing option is "Close and Reverse", then most of my EA will close very late.  i.e. cos my EA will use H4's previous bar value for "Lower than" that happened a few hours ago, that means, my EA will close a few hours after the prices already began to fall/change and I ended up losing those floating profit pips for such "delayed respond".  So I don't advice using "Close and Reverse" as your closing option but think 1 step a ahead...try using "change it's direction downward" for example to have better "sensitive" closing.


Ok, I hope by highlighting these implications, we will be in greater awareness to choose the best appropriate settings for our EA in order to accommodate the PBV features.
All the best...in your EA journey and progress.

Re: Which value does PBV take in LTF settings?

Popov wrote:

The ultimate purpose of FSB is to provide a reliable backtesting algorithm.

It is not possible MAs on D1 chart to make more than one crossover during a single D1 bar. And here is the contradiction: we may have several trades during a live trading session in a single day, but the backtester can produce maximum one trade (or no trades at all). If we think such behaviour is acceptable we admit that the all the FSB functions as backtesting,  optimization, strategy analysis ... are pointless.

My assumption for the fx trading is that:
- if a strategy shows a bad backtesting result, it will fail on the market,
- if a strategy shows a good backtesting result and passes all robustness tests and analysis, it may win on the market.

Without a backtest we have no idea how a strategy will perform on the market and what we can expect.

1. The Ultimate purpose of FSB is to provide a reliable backtesting algorithm.

Strategy backtesting is an essential tool to see if your strategy works or not. Backtesting software simulates your strategy on historical data and provides a backtesting report, which allows you to conduct proper trading system analysis. 

The effectiveness, accuracy and reliability of back testing rest on the data too (not just the algorithm).  Back testing is only as good as the data source we use.  That's why tick data is highly valued.  It provides better accuracy. 


Accuracy is of primal importance and thus strategy backtesting should be as realistic (using tick data and not bar value or previous bar value for EA's calculation or search of entry/exit point) as modern technology allows. 

A good (trading) simulator is one that provides a good training ground as close as the real environment can be.  Software that utlizes tick data recognised that the importance of letting you use the data as close as it is to your real trading environment.  Using Bar values to do backtesting produce less desirable results.  In addition, FSB's back testing results is further "distorted" by PBV function whereby instead of using the current tick data, it uses the previous bar value to do your back testing calculation and hence, producing a totally "foreign"/"fake" trading environment and that is far removed from the real trading environment that truly reflect how the price behave.


2. It is not possible MAs on D1 chart to make more than one crossover during a single D1 bar. And here is the contradiction: we may have several trades during a live trading session in a single day, but the backtester can produce maximum one trade (or no trades at all).


Yes, in real trading session, there can be many crossover within the bar, before it closes (and what's wrong with that, that's how the market behaves).

Which is acceptable?  To accept how the real market behaves (with many possible cross over within a bar) or to force our EA to accept what FSB can "handle? (only bar values)?

Yes, it is not possible to make more than 1 crossover during a single D1 bar because FSB only consider bar value, if tick data is use, we could able to "see" these information of several cross over which truly reflect the market's volatility and price action/behaviours.


3.  If we think such behaviour is acceptable we admit that the all the FSB functions as backtesting,  optimization, strategy analysis ... are pointless

"such" behaviour (whereby there can be multiple crossing happened within a bar) is not only acceptable but actually happened in real trading world (as you, yourself has said and observed).  It is not an issue whether it is acceptable, it is a issue of reality.  This is how the market really behaves  The failure to accept it and to deny the use of tick data, deprive us of developing robust EA to cope with real market behaviours.  Hence, FSB failure to recognise such "acceptable" behaviour and instead choose to organise it's backtesting data with bar values and use previous bar values for it's back testing calculation indeed render the results pointless ("unreliable") and thus explain why "what we see (in FSB's back testing result) isn't what we get in real/demo results.  It create a "false" trading environment for us to test and develop our EA that is far removed from reality.

How can we say FSB's back testing using PBV version is reliable?  When it's uses bar value and previous bar values instead of tick data.  Won't such method of backtesting calculation "distort" the accuracy and fail to truly reflect how the price behave in the real market?



4. My assumption for the fx trading is that:
- if a strategy shows a bad backtesting result, it will fail on the market,
- if a strategy shows a good backtesting result and passes all robustness tests and analysis, it may win on the market

It all depends on how the back testing is done.  If back testing's calculation is done with bar values and using previous bar values instead of tick data.  This method of backtesting doesn't provide an accurate reflection of how the market behaviour, how then can it produce reliable backtest results to form our basis of our decision whether a strategy is good or bad?

If you assumption is correct, then we would have seen more co-relationship and matching in performance between FSB's backtest results with EA's real performance in either live/demo account.  However, the reality is we don't see such strong co-relationship between what FSB's backtesting results with live/demo results.

If someone generated 100 profitable EA via FSB and test all of them out in demo/live account and only 1 out of 100 EA is truly profitable.  Do you call this back testing results reliable?  Is there significant co-relationship between the backtest results and the demo/live results? (did you observe your assumption come true, if you have been hearing your users comments correctly, we are all experience the opposite of what you are assuming.  In fact there are times when FSB backtest results showed me that my EA is not profitable (but I still went ahead to test it out because I have greater confidence in my trading theory than in FSB's back testing results) but in actual fact, my EA is profitable. 


5.  Without a backtest we have no idea how a strategy will perform on the market and what we can expect?

How do we know whether a strategy is profitable or not?  As I've said, it all depends whether a trader has developed any sound trading theory to begin with.  For those who has a sound trading theory, their EA will be profitable (even if FSB's back test showed opposite results).

I've mentioned there are 2 possible ways to develop profitable EA. 

1) Find and develop a sound trading theory.  My belief is "a sound trading theory will produce profitable EA.  And I've demonstrated this statement with my trading results posted several times.  I formulated these EA on my own without the need for a generator or optimizer.

2) Rely on accurate backtesting results.  But make sure the back testing method of using data is reliable and reflect truly how the forex market behaves.  As the saying goes, "backtesting is only as good as the data used".  The use of PBV, "distort" the prices and use previous bar values for calculation instead of tick data...in my honest opinion and logical deduction, such method of "manipulation" of data and price values, not only caused FSB to calculate my EA "wrongly" in back testing but also execute "wrongly" in real/demo testing.


All is not lost.  UPBV comes to the rescue.  With UPBV, despite the fact that this is a "mismatch" in the method of execution (any time when market conditions are fulfilled i.e. UPBV and backtesting (bar values calculation) and hence Popov warned about "wrong" back testing results.  UPBV posed 1 less problem than PBV.  My EA is able to execute correctly as I wanted it to be via using actual and current price value for it's calculation.



The purpose of my feedback of FSB's limitation is to raise the need to re look at FSB's inner working and hopefully find ways to overcome the limitations and improve FSB's performance.  I'm not here to be against FSB.  In fact, I've been a strong supporter but I'm not a blind supporter.  I want to be an honest and objective critic of the programme as possible in order to push FSB to a greater height and performance.

FSB's greatest and un-matched strength lies in the ease of use.  It is super user friendly, without any steep learning curves.  This is by far FSB's best asset.  I tried to use other competitors product and I'm totally lost (cos I don't have prior training in any programming language).  Why do I spend so much efforts in this forum, writing in and expressing my frustrations and helping other traders find success by providing trading tips?

It is because I feel that at the end of the day, FSB is still my best hope in helping me programme my EA without any need to learn programming knowledge.  If I have not placed such high hope in FSB, I won't spend so much time and effort in wanting to push for better changes and highlight it's limitation in hope that Popov would look into it and fine tune and improve FSB to be the best forex tools available in the market.  Likewise, if FSB isn't going to look into these issues I've raised and this channel of communication is close and lost, I would then have to seek other alternatives to enhance my EA performance and seek better backtesting tools to use.  This is something I'm very reluctant to do...if given a choice, I would wish FSB is my one and best forex trading tools.  When you see all my impressive trading results...this is not possible without FSB.  And I owe this to Popov for his wonderful masterpiece.  So can anyone still able to develop profitable EA via FSB.  Of course.  Just take a look at my trading results...it's a concrete proof.  But I believe we can do better than that.

Ps: I know what I'm asking, sounds like requeating for an "engine overhaul" to the whole data system that impacts the back testing, Generator and optimiser functioning.  But won't an engine overhaul usually end up with a better and more efficient system.  It pushes FSB up a number of notches.  And any Popov is forever seeking to improve FSB system.  Which is costlier? The cost involved to overhaul  the system or the cost of not changing it?  Which offers greater benefits, overhaul or keep the existing system?

Even if there isn't any overhaul, the least is to provide user the option to use UPBV, I can still make profitable EA and the "wrong" back testing as what Popov said won't bother me, as I said I can live with it.

Re: Which value does PBV take in LTF settings?

Hi Miroslav,

Thank you for explaining the workings of FSB Pro.  It is a truly useful piece of software which gives massive potential - it just needs our input!  Thank you for taking the time to discuss the LTF with us.  I am curious to what Hannahis is saying; and I can see their logic, but I also know you have been living with FSB for many years and put your everything in to it - your opinion on the LTF carries a huge amount of weight.  I guess I was just thinking that I would like to see if a strategy works whereby the longer timeframe parameters could be triggered by a much smaller timeframe entry.  I don't need to check more than every 5 minutes, so for me the bar opening condition vs on closing bar (use previous bar) issue wouldn't affect me as much; and it could still be backtested robustly - it would just be a way of getting a different sample rate without having to do the maths to convert the parameter from 5 mins to daily or to 4 hourly.

Thank you also to Hannahis for reading my post and commenting on it; I will re-read it soon as it's 1 am in the UK and it's time to turn in!

Cheers, George

Re: Which value does PBV take in LTF settings?

Hi Miroslav,

Just out of curiosity, if I wanted to enter on a 1 min bar but wanted to wait until the previous 1 minute bar closed above the 200 day MA, could I use LTF set to D1 and set up that condition?  Or would I have to convert the 200 day MA into the 200 x 60 x 24 = 288000 minute MA?  Am I able to set a MA of 288000 in FSB pro?

My discretionary trading that I do is off the daily (with sometimes entry off the H4 chart).  I know that one way of trading is to wait until the bar is closed  before entering a market or limit or stop order as the price hasn't been confirmed yet.  But in automated trading there might be an opportunity to enter a longer term trade not at the end of the day but during the trading day.  In other words sample the market every minute for entries for trades that might last hours.  The only point of entering using the M1 chart will be to possibly increase the sample size for an entry, not to do any scalping.  I know a scalping strategy can work but it is not in my interest.

I look forward to your reply,

Many thanks for helping me,

George

Re: Which value does PBV take in LTF settings?

You can use MA (D1, 200) with rule: The position opens above Moving Average.

http://s32.postimg.org/olh3ii39d/screenshot_1593.jpg

This chart is for MA (D1, 5) because the MA 200 is so far from the market that there is no crossover on my M1 history.

http://s32.postimg.org/3r4r0o8w1/screenshot_1594.jpg

This is not exactly what you want. It detects if the M1 bar opens above or below MA instead of a crossover. We cannot use crossover of market and indicators from different periods in FSB.

Please note that if you use "The bar opens above MA after opening below it" logical rule, it will detect crossover of the MA with its D1 chart instead of the strategies M1 chart.

...

MA with period of 288000 is not practical.

Re: Which value does PBV take in LTF settings?

Many thanks for explaining that Miroslav, really appreciate your support

George