This MUST get fixed

Viewing 15 posts - 16 through 30 (of 31 total)
  • Author
    Posts
  • #246615 quote
    PeterSt
    Participant
    Master

    Hi ,

    Sorry to be the xth person jumping on you, but you should really try to think the other way around.
    Everything, really everything can be done, if you only have a correct base of thinking how the logic “is”. I will try to explain this latter :

    If the Chart is 1 minute, inside of the coding you can do ALL you want from 1 minute up to days and beyond (if it is only a multiple of 1 minute in your coding – and you understand that perfectly). So where can it go wrong ?

    First off, a Stop Loss, which is a pending order command, is not related to any TF at all. You put it, and it is active. However :
    You might want to change it at the higher granularity, which is … 1 minute. Thus, a SL can be reset all right, and thus changed per the 1 minute (the TF of your chart – could also be 5 seconds etc.). Nothing can go wrong …
    All what could happen is that you want it the other way around – such as changing the SL (etc. etc.) at the interval of the (1) hour. Well, then you put a TimeFrame command and under the scope of that you reset and change the SL

    This is now only about the SL while it could be about anything. And there really really is nothing you can not apply like described above IF ONLY you accept the smaller TF for limiting your backtesting. Thus, it must be clear that using a TF on the chart of 1 minute, brings something like 1440 time (a bit less) length of backtesting. So if you are not afraid of that, then believe me please, all what you want can be done.

    Intermezzo : you said Trailing Stop, which is for IB *or* a Pending Stop to begin with, *or* just a Market order, or indeed a SL (Set Stop Loss). For IG the Trailing Stop really can exist. In your later post you started to talk about the SL, which I just dealt with and which can work too, but looks a bit odd to me.

    Let’s make it more practical : If you give one concrete example of something you can not do, we will work out that example to a working situation. No need to give code – just description. One thing : you should start your thesis with thinking of the 1 minute (or less) TF of the chart. In the code you have TimeFrame commands (always of longer time than the Chart’s TF, or of the same time as the Chart).
    Deal ?

    #246616 quote
    deleted23092025
    Participant
    New

    @JS No you can not.

    Once again since all timeframes used in the code should be multiplies of the timeframe used on the chart which the strategy is applied on (the base timeframe).  IT IS NOT POSSIBLE

    #246617 quote
    deleted23092025
    Participant
    New

    @PeterST what are you talking about?

    I have a 4 hour system that my stoploss only update every 4 hour, 13.00, 17.00, 21.00, 01.00 and so on. So if at 13:50 my latent gain is : 4000€/1 point. And my in my trailingstopcode it should start at ticking at 0.4% but as it updates every 4 hours I am not allowed to use it on 1 minute. When time has came to 17.00 my latent gain can be 2€ instead, and then the trail will not start.  There for higher timeframe systems do not work well as there is not a way to use a the trailingstop on lower  timeframe.

    #246618 quote
    PeterSt
    Participant
    Master
    , you are correct that the way JS accidentally brings it, can not work. But this is a “typo” or meant differently :

    Yes, you can run a system on a 1 hour timeframe with a trailing stop on 1 minute…

    The “system” as such, is the functional system. As in : All works with 1 hour, but the details (like adjusting trailing) are done per the minute.
    This is a matter of speaking.

    So, 100% sure that JS should have said : the chart runs on 1 minute, and the functional system deals with 1 hour (calculating the averages, maybe entries only once per hour).

    And if am om not correct on the “typo” of JS, then he has to explain something. 🙂

    #246619 quote
    PeterSt
    Participant
    Master

    @PeterST what are you talking about?

    I have a 4 hour system that my stoploss only update every 4 hour, 13.00, 17.00, 21.00, 01.00 and so on. So if at 13:50 my latent gain is : 4000€/1 point. And my in my trailingstopcode it should start at ticking at 0.4% but as it updates every 4 hours I am not allowed to use it on 1 minute. When time has came to 17.00 my latent gain can be 2€ instead, and then the trail will not start. There for higher timeframe systems do not work well as there is not a way to use a the trailingstop on lower timeframe.

    Please remember : start your thinking with the Chart being at 1 minute. 🙂 Then your text can’t apply.
    You could have another text though. 🙂

    #246621 quote
    deleted23092025
    Participant
    New

    Once again I´m aware of multi timeframe works and that you can combine timeframes.

    But the problem still remains that all your systems on higher timeframes can not combine a trailingstopcode on lower timeframe.

    #246622 quote
    PeterSt
    Participant
    Master

    What is the use of all of us repeating ourselves ?

    Are you going to give that example now ?

     

    My TF of the Chart is 1 minute – I want to …

     

    Wouldn’t you be happy if I solve it for you ?

    #246623 quote
    JS
    Participant
    Senior

    There is no typo. You can run a system on a 1-hour timeframe while using a trailing stop based on a 1-minute timeframe.
    The only requirement is that the lowest timeframe (default) must be the one displayed on the chart…

    #246628 quote
    deleted23092025
    Participant
    New

    And exactly that is the problem @JS. “That requirement” ruins all systems on higher timeframes which I think MUST be changed

    If Instead run the system on 1 minute I will not get the same results. You can test it yourself.

    Test this on 1 hour timeframe.

    Timeframe (1 hour)
    MA1Hour = average[200,8](typicalprice)
    Entrycondition = (close>MA1Hour)

    IF NOT LongOnMarket AND Entrycondition THEN
    BUY 1 CONTRACTS AT MARKET
    ENDIF

    //Timeframe (1 minutes)
    if time = 170000 then
    sell at market
    endif

    Then test this on 1 minute timeframe.

    Timeframe (1 hour)
    MA1Hour = average[200,8](typicalprice)
    Entrycondition = (close>MA1Hour)

    IF NOT LongOnMarket AND Entrycondition THEN
    BUY 1 CONTRACTS AT MARKET
    ENDIF

    Timeframe (1 minutes)
    if time = 170000 then
    sell at market
    endif

    #246631 quote
    JS
    Participant
    Senior
    #246632 quote
    phoentzs
    Participant
    Master

    “updateonclose” must be included in the large timeframe…

    Timeframe(1hour, updateonclose)

    Try it.

    thanked this post
    #246636 quote
    deleted23092025
    Participant
    New

    Thanks guys

    appreciated.

    #246637 quote
    phoentzs
    Participant
    Master

    I told you… probably a code error…

    thanked this post
    #246639 quote
    deleted23092025
    Participant
    New

    My misstake I apologize.

    How do you run systems that are on higher timeframe (1 hour, 4 hour, daily?)

    Do you allways put them on lower tf  for the trailingstopcode/breakevencode?

    JS thanked this post
    #246641 quote
    JS
    Participant
    Senior

    That is indeed the intention: when you use a higher time frame you can combine it with a lower time frame for your “position management”…(Buy, Sell, SellShort, ExitShort, trailing stop, breakeven, etc.)

Viewing 15 posts - 16 through 30 (of 31 total)
  • You must be logged in to reply to this topic.

This MUST get fixed


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 30 replies,
has 5 voices, and was last updated by phoentzs
9 months, 3 weeks ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/30/2025
Status: Active
Attachments: 2 files
Logo Logo
Loading...