One-time buy Signal at System Start

Forums ProRealTime English forum ProOrder support One-time buy Signal at System Start

Viewing 15 posts - 31 through 45 (of 46 total)
  • #239982
    JS

    When I use your code in “live demo,” the first position opens…?

    #239984
    JS

    In this case, opening a position on the first bar in combination with an indicator only works when the “PreLoadBars” are equal to the indicator’s period…
    So here, PreLoadBars=36…

    1 user thanked author for this post.
    #239985

    <span class=”bbp-author-name”>stalba</span> it appears that PreLoadbars = 36 is critical if ‘NOT onMarket’ is used. You use period of 36 in your SuperTrend, hence PreLoadbars = 36 is critical I guess.

    Or it appears you could miss out ‘NOT onMarket’ and use PreLoadbars = 100 / whatever … as I posted above … unless anyone has good reason not to do this??

    EDIT/ PS

    I saw JS last post after I posted mine.

    1 user thanked author for this post.
    #239987

    Seems to work now, like you both said either with “36 bars + NOT ONMARKET” or e.g. “100 Bars without NOT ONMARKET”, but I guess if 36 bars are enough, I’d go with the “NOT ONMARKET” version. Next, I will test it with a 1-day timeframe – thanks! 🙏🏼

    1 user thanked author for this post.
    avatar JS
    #239989

    Without trying the code : I bet you that this is because the code has ran several times in live before the PreLoadBars have passed. Thus, have those at 100 and the code will be run 100 times and EntryFlag has turned 1 long gone …

    The catch here is that during the PreLoadBars stage the ProOrder commands are NOT executed. Thus no Buy and no Sell or anything.

    Years ago I reported this as a severe bug. I myself don’t notice any more that this is still present. Because see below …

    … which is what I apply always since.

    During Backtesting this is applied differently by PRT, because there the code is NOT run during the PreLoadBars stage.

    2 users thanked author for this post.
    #240004

    What is below for on Lines 4 and 5?

    []
    []
    #240007

    Apologies @PeterSt but are you saying the feature of having to wait for 1000 preloadbars (in this case) before anything is executed by an auto-trader – can be managed (overcome) by the code you’ve kindly shared.

    I feel I’m missing the devil in the detail a little and you’re not saying that entirely but that’s how it’s reading to me (the uninitiated)

    PreLoadBarsSet = 1000

    and

    If BarIndex > PreloadBarsSet then

     

    I have seen you post this before where preloads have been discussed.

    Seeking a little clarity here, if this is the case and how it relates to backtest, demo and live.

    #240014

    I think what you said was in the context of this – specific – discussion, where the OP was not seeing triggers for reasons X and how that relates to bars elapsed with respect to preloads and indicator code employed. Your code simply eliminates erroneous triggers and perhaps outcomes given the dataset hasn’t reached required size.

    Bit of a waffle there, pls correct if I’ve borked it …

    #240015

    What is below for on Lines 4 and 5?

    []
    []

    That would typically be the calculation of MACDs and all that *require* the preloaded bars (or else them preloaded bars would be in vain 🙂 ).

    1 user thanked author for this post.
    #240016

    I think what you said was in the context of this – specific – discussion, where the OP was not seeing triggers for reasons X and how that relates to bars elapsed with respect to preloads and indicator code employed. Your code simply eliminates erroneous triggers and perhaps outcomes given the dataset hasn’t reached required size.

    Bit of a waffle there, pls correct if I’ve borked it …

    I hope we’re on the same terms with :

    A lot can be done in the code with setting flags etc. etc. etc., that code assuming that a Buy at Market (etc.) would have done so. Thus :

    Sadly, in Backtest this can not be noticed and all goes fine.

    Please beware : I never use(d) Demo, so I cannot tell whether Demo will show the same behavior as I have testified (towards PRT) for Live. But I assume it is the same, and with that the cause for the off behavior shown in this thread. GraHal actually showcased it accidentally (in any event well done !).

    2 users thanked author for this post.
    #240090

    Hi again,

    I’ve been testing several strategies on different instruments over the last two days, but on a 1-day timeframe (which is my goal here), no positions are being opened. One strategy got canceled with a message from PRT suggesting to increase the PreLoadBars. I set it to 10000, but still no positions opened on the next candle. I’ve tested these same systems on 1-minute and 5-minute timeframes, and they worked perfectly. Does anyone know what might be causing the issue with the 1-day timeframe?

    One of the codes I’ve tested (with MBTC) is this one:

    #240095

    Make sure the asset / instrument selected has a data history exceeding 10K days.

     

    2 users thanked author for this post.
    #240226

    Thanks Roberto! So after all, this is no solution for an auto trading system with futures, as the history for PreLoadBars is never sufficient after you’ve rolled into a new contract? 🥲

    #240227

    Well, although technically you are correct I suppose, functionally it would be “wrong” to anticipate such history on a future ?
    I will admit, this gets me thinking.

    Interesting ?

    #240245

    Yes, I’m honestly a bit lost here — as I find it hard to believe that no one else is using a trading system for futures… from what I understand, the PreLoadBars are necessary for any kind of indicator to work properly, right? I’ve developed a few systems over the past couple of months that showed promising results, but now they won’t work in ProOrder futures auto trading.

Viewing 15 posts - 31 through 45 (of 46 total)

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