IMPORTANT : BIG BUG ON SPREAD !

Forums ProRealTime English forum ProOrder support IMPORTANT : BIG BUG ON SPREAD !

Viewing 15 posts - 46 through 60 (of 66 total)
  • #184583

    Hi @zilliq,

    A first quick response and what I notice :

    1. You use Tick by Tick there, while I don’t;
    2. I use 1 second bars, you 1 minute;
    3. You kind of formed the strategy around the trade, while I set a time-period boundary on existing trades (on an existing system);
    4. It looks like you set a profit target (in percentage ?) which I don’t.

    Ad 4.:
    This is, I think, the most important. With each of your fractional spreads under 1, that target can be met within the period you give it (which will be on a number of bars for the backtest – like 1K or less, as it seems to me). Once the spread becomes too high, the target can’t be reached in that time. Thus (IMO !) give it more time, and it ($10) will be reached after all. But see the below which kind of undermines this thinking.

    The way I work (with my given examples) is not a specific target, but a moment when the profit is taken. This is somewhat more difficult to explain by me, but it allows for the profit to be less and less with the spread being higher and higher. At least I showed (or try to) that this is perfectly linear (each time 8,50 less), no matter it jumps because of rounding (it should be 4,25 from fraction of 0,1 to the next).

    Of course it will be so that the issue (??) manifests with your way of working anyway, however, to me this tells that this way of working is not one which suits reality (??). Although I must say, maybe it does suit or match reality, but you can’t control which spread your strategy should use. I too could set the target to $10 and it will just do it, with one difference per other fraction of spread : the trade will take longer to get there (if at all). Thus in your case you could look at the number of minutes each trade has ran, and you should see a difference, UNLESS the difference in spread can be covered for within one minute …

    Ad2.:
    Do you see the cruciality of this too now ? My difference in spread will be caught only over more bars (2 bars) and thus my trades will run longer (seonds-wise) more easily. You have one minute for covering the difference in spread, while I hade one second only. It should mean that your position quantity should be 60 times what I used in my example (480K) to see the same as I do ?

    Who knows the conclusion should be that for the 1 second timeframe the Spread setting in the Editor of 1 decimal is not sufficient and 2 decimals is, but with 0,5 second timeframe it is okay with 1 decimal ?? (my situation)

    In the end my #1 (above) plus #4 in combination are also crucial. Your target can be taken within that bar. I only look at close boundaries of bars, which for me does not make a difference (not setting a target as such). For you it will !

    We will nail it …

    #184586

    Hi @PeterSt

    For me it’s not a problem of strategy

    For example use this simple code

     

    // Définition des paramètres du code
    DEFPARAM CumulateOrders = False // Cumul des positions désactivé

    // Conditions pour ouvrir une position acheteuse
    indicator1 = SuperTrend[3,10]
    c1 = (close > indicator1)
    indicator2 = MACD[9,18,3](close)
    c2 = (indicator2 CROSSES OVER 0)

    IF c1 AND c2 THEN
    BUY 1 SHARES AT MARKET
    ENDIF

    // Conditions pour ouvrir une position en vente à découvert
    indicator3 = SuperTrend[3,10]
    c3 = (close < indicator3)
    indicator4 = MACD[9,18,3](close)
    c4 = (indicator4 CROSSES UNDER 0)

    IF c3 AND c4 THEN
    SELLSHORT 1 SHARES AT MARKET
    ENDIF

    SET STOP %LOSS 0.03

    SET TARGET %PROFIT 0.01

    On AUD/CAD dor exemple 1 minute Size lot 100 000 and you will see that you obtain the same gain with 0.2 , 0.5 or 0.9 spread

    See U

    #184608

    See U

    Haha, Yes. But I see exactly what I saw already :

    • You use a percentage for target;
    • That target will be caught in the 1 minute bar, in my case (with 150K AUD) all the same up to even a Spread 2,0. Only at 2.1 it changes (your exact code !).

    So I guess now it is time that you use my 1 second  bars and see that exactly happens what I told you : jumps per 0,2 of spread (thus 0,1 and 0,2 are the same – 0,3 and 0,4 are the same, etc. etc.).

    Please try it and reason for yourself how it can be, OK ?
    N.b.: In this case (your code) the number of trades change per the one minute time span (TF S1) I give it, but this is all logical.

    This is key for understanding it all :
    Within the 1 minute bar your trade will make a profit of 0,01%. The first attachment shows that it does that in 45 seconds with a Spread of 0,1 (you can’t see that but trust me).
    The spread of 0,2 obtains the profit in the same time (resolution/rounding issue). This shows in the 2nd attachment.
    With the spread of 0,3 this changes, and now 53 seconds is necessary. See 3rd attachment. 0,4 will require the same amount of time (not shown).
    In your case obviously all fall within the same bar and you are not capable of doing a second trade within that m1 TF, right ?

    Otherwise things depend on when the trade starts within the 1 minute bar.

    For hopefully somewhat better understanding, your 1 minute timeframe shows in the 4th attachment (ran over the exact same time span as the previous examples, which is 9 minutes to cover for one trade in the m1 TF);
    One trade only, and where it ends you can’t even see (but you can know, because you can see it with the S1 TF *if* you would be capable of letting it start in the same second – which you can’t).

    If I am still too poor at explaining, let me know. But try the 1 second timeframe yourself first, so you will get a feel for the difference. Also observe that my gain is not changing because of more profitable trades (or more profit in the profitable trade) over the course of the spread going from 0,2 to 0,3. Instead, it springs from the losing trade now losing (2) more … This makes it difficult to compare and understand (both trades are subject to the same spread). This is all rounding stuff again. Not bugs.

    #184623

    If you are on 1 s, 1 mn or 1 hour you should have spread, always. It’s not normal the gain doesn’t change.

    Moreover it changes when you choose cost per trade 2,5 USd/trade=0.25 pip of spread on EUR/USD

    Otherwise it would mean we need to trade on 1 mn to not have to “pay” spread

    I try on 1 s

    #184624

    First, if you change %loss/%profit by pip, if you think there is a problem with %. Same bug as you see

    Without spread gain=4140 with a spread of 0.9 gain=4140

    EUR/USD 1 mn

    Next ..

     

    // Définition des paramètres du code
    DEFPARAM CumulateOrders = False // Cumul des positions désactivé

    // Conditions pour ouvrir une position acheteuse
    indicator1 = SuperTrend[3,10]
    c1 = (close > indicator1)
    indicator2 = MACD[9,18,3](close)
    c2 = (indicator2 CROSSES OVER 0)

    IF c1 AND c2 THEN
    BUY 1 SHARES AT MARKET
    ENDIF

    // Conditions pour ouvrir une position en vente à découvert
    indicator3 = SuperTrend[3,10]
    c3 = (close < indicator3)
    indicator4 = MACD[9,18,3](close)
    c4 = (indicator4 CROSSES UNDER 0)

    IF c3 AND c4 THEN
    SELLSHORT 1 SHARES AT MARKET
    ENDIF

    SET STOP pLOSS 3

    SET TARGET pPROFIT 2

    #184627

    And now on 1 seconde, same conclusion

    Without spread gain =6550

    With a spread of 0.9 = Gain = 6550

    Nothing change, same problem

    #184630

    On 1 s, I change ploss=6 pprofit=4

    Same conclusion, gain doesn’t change when spread change

    #184633

    On the second tst 1 s loss=3 target=2 the trade last more than 2 minutes

     

    #184638

    Without spread gain =6550 With a spread of 0.9 = Gain = 6550

    Without spread I see a gain of 6570 and there’s one trade less (taken from your own screenshots :-)).

     

     

    #184640

    Probably it changes when I change of candle (I was in 1 minute)  (It’s normal and I see that sometimes)

    #184641

    Do you use such a system live or is it just an example?

    #184642

    If you are on 1 s, 1 mn or 1 hour you should have spread, always. It’s not normal the gain doesn’t change.

    All right. You or me or we both miss the concept somewhere. 🙂

    If you trade with 100 and you tell the system to take profit at 1,2% gain, you will gain 1,20 euro. You just *will* unless the trade runs in a loss.
    This is not related to the spread. Thus for example, if you trade with 100 and the spread taken by the broker is 0,0008, then your profit will be 1,20 regardless. One thing : the spread (given in the Editor’s field) is theoretical, so practice will turn out to be different to some degree. Thus, the trading platform (PRT) takes care of you having the profit you want – the Set Target %Profit n in your first example.
    Thinking of profit in points (your second example) is more easy to grasp because the broker-system eats points of profit  by means of the spread, and a loss (per amount of the spread) is in order right from the start of the trade. This is what the platform (PRT) will calculate with. Thus it first climbs back to zero profit (at that moment you have no profit BUT the price has risen in the Long situation) and from there tries to reach your pProfit.

    (there is some more to this which I scratched for now)

    Lastly this one again :

    If you are on 1 s, 1 mn or 1 hour you should have spread, always. It’s not normal the gain doesn’t change.

    this is what you say because probably your mind is set *not* to show it. You will have noticed that I *do* like to show it (the spread just works, also a mind set) and I thus show you all over that it changes the results all right. So how can I be showing that it works (I did !!) while you show it does not work ? -> this can’t be unless I fake things. But I fake nothing … (and even used your own code for it).

    I see now that BackTesting already was a skill, but per today possibly an other dimension was added to that. Haha.

    #184649

    Do you use such a system live or is it just an example?

    An example to show the bug

    #184650

    If you are on 1 s, 1 mn or 1 hour you should have spread, always. It’s not normal the gain doesn’t change.

    All right. You or me or we both miss the concept somewhere. 🙂

    If you trade with 100 and you tell the system to take profit at 1,2% gain, you will gain 1,20 euro. You just *will* unless the trade runs in a loss.

    This is not related to the spread. Thus for example, if you trade with 100 and the spread taken by the broker is 0,0008, then your profit will be 1,20 regardless. One thing : the spread (given in the Editor’s field) is theoretical, so practice will turn out to be different to some degree. Thus, the trading platform (PRT) takes care of you having the profit you want – the Set Target %Profit n in your first example.

    Thinking of profit in points (your second example) is more easy to grasp because the broker-system eats points of profit by means of the spread, and a loss (per amount of the spread) is in order right from the start of the trade. This is what the platform (PRT) will calculate with. Thus it first climbs back to zero profit (at that moment you have no profit BUT the price has risen in the Long situation) and from there tries to reach your pProfit.

    (there is some more to this which I scratched for now)

    Lastly this one again :

    If you are on 1 s, 1 mn or 1 hour you should have spread, always. It’s not normal the gain doesn’t change.

    this is what you say because probably your mind is set *not* to show it. You will have noticed that I *do* like to show it (the spread just works, also a mind set) and I thus show you all over that it changes the results all right. So how can I be showing that it works (I did !!) while you show it does not work ? -> this can’t be unless I fake things. But I fake nothing … (and even used your own code for it).

    I see now that BackTesting already was a skill, but per today possibly an other dimension was added to that. Haha.

    Of course you don’t fake Peter 😉

    But as you see, I did numerous trials and always the same conclusion, I even use the 1 s unit and it is the same conclusion

    May be use EUR/USD, the code and say what I want to trial to show it works ? Because actually it never works with me, 1mn, 15 mn, 1 s

    Cheers

    #184651

    But as you see, I did numerous trials and always the same conclusion, I even use the 1 s unit and it is the same conclusion

     

    zilliq wrote: Without spread gain =6550 With a spread of 0.9 = Gain = 6550

    Without spread I see a gain of 6570 and there’s one trade less (taken from your own screenshots :-)).

    Can you look into this please ? this is not the same, despite you say it is in post 184627

Viewing 15 posts - 46 through 60 (of 66 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login