1 (edited by dustovshio 2022-07-23 08:31:04)

Topic: Olhc vs tick

I noticed that the data FSB Pro uses is based on 1 minute bars; there is no option for tick.  Do all indicators in FSB work based on the open price of the bar? What about the case of a trailing stop, SL, Tp and the like does it only look at the opening of the bar to determine these things, so if there was a 100 pip move and your SL would have gotten hit the strategy generator will not see this and thus generate different results than tick testing or demo/live trading?  Or is the code it generates  supposed to use hidden SL,TP, TS that are only based on the bar open?  It seems like the code generated does indeed ontick() which creates additional noise that corrupts the indicator values and creates a disparity between FSb pro and MT5 results.  Seems as though oftentimes there is no correlation to the performance shown in FSB vs the actual performance in demo or strategy tester based on ticks (but there is a close correlation when 1M OLHC is used).  Is there a workaround to force MT5 to only look at the bar, or is it not possible because some    of the indicators (third party or otherwise) depend on ticks?   Some of the indicators specify "new bar"  While others say "use previous bar value".

Re: Olhc vs tick

<data FSB Pro uses is based on 1 minute bars; there is no option for tick>
It uses the data you select. If there is necessity to eradicate ambig. bars (https://forexsb.com/wiki/fsb/manual/ambiguous_bars), it uses intrabar scanner with lower timeframes, if available.

<Do all indicators in FSB work based on the open price of the bar?>
Indicators are calculated on their designated base price, you can choose between base prices when you set up indis in FSB.

<What about the case of a trailing stop, SL, Tp and the like does it only look at the opening of the bar...>
No need to get fixated on open price, where is it coming from? Conceptually Studio is using bar opens for trade openings and closings (except if TP or SL is triggered), events take place at bar opens, and that's it it, but you are using FSB Pro. Trailing stop trails on a bar basis in Pro, new SL gets set at a new bar opening if it is necessary.

<Or is the code it generates  supposed to use hidden SL,TP, TS that are only based on the bar open?>
Stops and profits are calculated on position opening price, not bar openings, the latter is a ludicrous suggestion smile

<Seems as though oftentimes there is no correlation to the performance shown in FSB vs the actual performance in demo or strategy tester based on ticks>
Drop the ticks, which are not real ticks anyway. Indis or the main concept of FSB does not depend on ticks, it uses full bar data, so no need to complicate things by using ticks. My personal opinion is that backtesting does not produce a profit,  I've never witnessed it and never will. Most important question is to verify that strategy works in live trading just as in backtesting - same orders at the same time day in, day out.

3 (edited by dustovshio 2022-07-23 12:47:00)

Re: Olhc vs tick

<data FSB Pro uses is based on 1 minute bars; there is no option for tick>
It uses the data you select. If there is necessity to eradicate ambig. bars (https://forexsb.com/wiki/fsb/manual/ambiguous_bars), it uses intrabar scanner with lower timeframes, if available.

Can you upload tick data? 
If so then does FSB use those ticks in its calculations? 
When you say this " Indis or the main concept of FSB does not depend on ticks" its sounds like you are saying that FSB doesn't use ticks in its calculations, which is what my original question was.  "Its uses full bar data" by this I'm assuming you mean OHLC, which goes back to my original question.  Saying "It uses what data you want" doesn't address whether it can use ticks.  if indeed it could use "whatever data I want" then it could use ticks because "I want it to".  Actually it doesn't use whatever data you want it uses specific kinds of data.  So When  you say "FSB doesn't use ticks its uses full bar"  Then you just contradicted  your statement "it uses whatever data you want" because in the latter statement whatever you want  that could include tick data. So it can't both use tick data and not use tick data.  You could have just said this: no it doesn't use tick. Or yes it does use tick.

The code uses the isnewbar() function and it appears the indicators are based on the open of the bar.  Real tick backtesting is more accurate than 1 minute backtesting, and it is probably that given the two options OLHC or every tick. Every tick would be more accurate to live trading than OLHC.  There seems to be a major flaw in the way FSB handles ticks; either the code doesn't seem to work properly and the ticks are introducing noise and corrupting the signals.  As I previously stated the backtest on 1M OLHC resembles the backtest on FSB for the date, whereas on ticks it doesn't.  Your statement that backtesting doesn't matter is "ludicrous", FSB itself is based on backtesting, and the entire point of the process is to reduce toil and streamline the process of finding profitable systems; all of which relies on backtesting and selecting the most profitable ones.  If there is no correlation between profitable backtest vs forward test the software itself is worthless.  Obviously real trading doesn't equal the backtest, but the whole point is to trade the most profitable backtests because there isn't enough to time to trade random systems statistically it would take centuries to trade random indicators and random parameter values and find a profitable system.  I can understand if the forward test is off, but when there is absolutely no correlation between tick backtesting and 1M OLHC backtesting the chances of it being profitable are about no greater than any random system so you might as well just be flipping a coin.

Yes I get the point that FSB is supposed to work on bars.  If this was the case it would do just that and the tick backtest would correctly extrapolate the bar OLHC from the ticks, which it doesn't properly do.  If this were the case the 1M OLHC would be almost identical to the Tick backtest which it is not.  I'm not saying that FSB doesn't work with bars, it clearly is programmed to work that way, its just doesn't work like that  in practice.

4 (edited by dustovshio 2022-07-23 16:20:11)

Re: Olhc vs tick

when I put the following code inside the isNewbar() function it causes the tick and 1M backtest to match. However the results no longer correlate to FSB for the same dates (previously they did match using 1M).  This kind of leads me to think that the indicators values are getting changed by the ticks and not by the bars.   

void OnTick()
  {
  if(current_chart.isNewBar()>0)
     {     
      PrintFormat("New bar: %s",TimeToString(TimeCurrent(),TIME_SECONDS));
         if(__symbol!=_Symbol || __period!=_Period)
     {
      if(__period>0)
        {
         actionTrade.OnDeinit(-1);
         actionTrade.OnInit();
        }
      __symbol = _Symbol;
      __period = _Period;
     }

   actionTrade.OnTick();
     }

  }

I looked at the visual and it looks like on both charts sometimes the trade is opened at the high.  The trades are similar on both charts but it just looks like on the 1M chart the trades will close at the high or low for higher profit whereas on the tick it sometimes does close at the extreme as well, but it just isn't as favorable.  I'm using
stark bands - position opens below upper band
volumes - volume is lower than level line
enter once,
modified optimum elliptic filter - bar opens below the moving average. 
force index - changes its direction upwards
heinken ashi - enter long at the HA low 
Everything is set to "use previous bar value".

Supposing everything is based on the previous bar then how is it possible its opening trades at the high or low of the bar such as is in the example image. There is no previous bar, no previous swing.  the HA rule is enter at HA low how does it know where the low is? Im using zero latency slippage. When I use open prices only it actually does only place orders at the open (but it also loses, and opens very few trades).  So maybe there's a "bug" caused by the heinken ashi (and several other indicators) where it opens or closes orders at the last bar high/low.  You would think that when it says "enter long at the HA low" then it would place a stop or limit order at the last bar high or low or something but it looks like it just goes back or forward in time and places an order at the high/low of the bar.  If you are using OHLC bars how is it even possible to place an order at the high or the low of the bar. You don't even have that data until the bar closes, so isn't it physically impossible to place orders anywhere but the open/close of the bar?

Post's attachments

111.jpg 421.42 kb, file has never been downloaded. 

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

Re: Olhc vs tick

<Can you upload tick data?
No.

<You could have just said this: no it doesn't use tick. Or yes it does use tick.
Stop ranting, it is offensive, especially given the fact you didn't post a clearly formulated question with a question mark. English is not my mother tongue.

< Real tick backtesting is more accurate than 1 minute backtesting
No. And my answer is strictly said from the perspective of FSB. I can create thousands of strategies, which have no ambig. bars, meaning the backtesting is 100% accurate. Is there a need for tick data? Absolutely not, how many times do one has to backtest a strat? Moreover, on tick data, which only contributes to wasted time, heat and electrical bill and offers no additional incentive or knowledge?

<Your statement that backtesting doesn't matter is "ludicrous", FSB itself is based on backtesting, and the entire point of the process is to reduce toil and streamline the process of finding profitable system
That is very cute of you to take my words out of context. Let me say it again - when FSB itself is based on backtesting and it is excellent at that (instantenous results FFS, pardon my French, but if it so quick, something must be wrong, right?!), why the hell do people need a death cycle of backtesting of the same strat over the same piece of data or additionally tick data? This doesn't reduce toil, it increases it. And there's no profit in multiple backtests, especially when all those tests show profit.
Do trade the most profitable backtests, after a while tell us how did it go...

Given the constraints of mt tester and understanding that FSB's point is not to produce experts for tester, but to use mt as a trading tool for its EAs, I took your strat out for a dance. As I explained, the point, the whole point and nothing but the point is to have equal behaviour between trading and after-the-fact backtesting. Markets are closed, so tester it is. I pasted the results together, attached as a pic. By the way, FSB's testing accuracy was 100%, do I need tick data for another round of backtesting?

Mt tester showing crap -> it has done so since its inception.
Mt live trades corresponding to after-the-fact backtesting using same data -> no problems.
Mt live trades    n o t  corresponding to after-the-fact backtesting using same data -> big problem, which needs to be addressed.

Post's attachments

bal.png
bal.png 32.14 kb, file has never been downloaded. 

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

6 (edited by dustovshio 2022-07-23 23:11:42)

Re: Olhc vs tick

In the attached image the backtest was based on 1M OHLC.  10 out of 10 trades are placed at the very top and bottom of the bar.  This is a bug and is impossible to do in live trading.  You cannot go back in time and place a trade at the top or bottom of the bar.  Furthermore you cannot download an entire bar from the future before it forms and decide to place a trade at the bar's extreme, as the EA clearly does.

Post's attachments

112.jpg 425.85 kb, file has never been downloaded. 

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

Re: Olhc vs tick

Dustovshio,

Please share your FSB strategy. We will see if there is something wrong with it.

> 10 out of 10 trades are placed at the very top and bottom of the bar.

If it is true, it sounds suspicious.

The FSB Pro (and EA Studio) indicators place signals on fixed prices from the perspective of live trading - not backtesting.
If an indicator is based on the High and Low of the bar, it should take these levels from the previous bar. The indicator does not use the current once.

It is possible to have a bug in some of the indicators. If you share the strategy, we can check it.

...

We do not rely on tick testing. FSB Pro is designed for backtesting on Bar Data.
Of course, there are cases when the Bar data informarion is not enough.

For example, if we have an SL and TP within the range of a bar, it is not clear what to hit first. FSB Pro play safely in such cases. It marks the ba as "Ambiguous" and hits the SL. (when we use "Pessimistic" interpolation)

FSB Pro can load lower time data to improve the calculation precission.

It shows a stats named "Backtest quality". If it is near to 100%, it means everyuthing is OK and you don't need to search for other testing methods.

8 (edited by sleytus 2022-07-25 05:56:31)

Re: Olhc vs tick

dustovshio wrote:

In the attached image the backtest was based on 1M OHLC.  10 out of 10 trades are placed at the very top and bottom of the bar.  This is a bug and is impossible to do in live trading.  You cannot go back in time and place a trade at the top or bottom of the bar.  Furthermore you cannot download an entire bar from the future before it forms and decide to place a trade at the bar's extreme, as the EA clearly does.

Not a bug -- pilot error.  Furthermore, the chart and its display markings are drawn by MT4.  FSB doens't draw markings on a chart.  FSB computes signals and calls APIs exposed by MT4 to Enter or Exit a trade.  If you don't like where MT4 places display markings then that's something you should take up with MetaQuotes -- it has nothing to do with FSB.  If you want to know the actual price that a trade was Entered / Exited then check Strategy Tester's 'Results' tab.

MT4 doesn't download future bars -- I don't know where you got that idea.  And I don't know where you got the idea that MT4 goes back in time to place trades.

There's some misconceptions going on here.  Before accusing FSB of having bugs, you might consider first learning how to use it to trade successfully and also learn how to interpret an MT4 chart.