Price Range function

Forums ProRealTime English forum ProOrder support Price Range function

Viewing 15 posts - 16 through 30 (of 32 total)
  • #186452

    @Nicolas, see my ‘process of elimination’ reply below and advise.

    Attached is a non-exhaustive list of the elements that can impact a live trading strategy and create differences with a demo account and/or backtests:
    • Spread
    • Slippage
    • Orders rejections due to one of the above reason, but also because of the allowed distance from current price to put pending orders (known as “minimal distance”)
    • Different trading hours (ProOrder code launched in a different time zone / custom hours, by the user)

    MQ – The system has been set to use US NYSE only

    • Coding problem: division by zero error, null or negative periods for indicators, ..

    MQ – No special maths related function is used in the code division etc.

    • Lack of responsiveness of IG demo servers (if IG is the broker), although this has improved considerably since last year.

    MQ – The IG live system and account is used ie no demo account. Therefore, good responsiveness is expected.

    • Make backtests without tick-by-tick option

    MQ – Tick-by-tick option was not used during the back testing.

    • “set stop trailing” instruction that give IG the total control of your stoploss, can be moved differently between accounts due to points above

    MQ – The standard stop-loss code is SET STOP %LOSS 50 so not expecting this to create any issue.

    • Limited risk accounts and their rules

    MQ – Real trading CFD account has no special rules and more than enough funds to cover this strategy.

    • Guaranteed stoploss rules and fees

    MQ – Not using in the code and not expect this to create any issue.

    • Starting a strategy at a different time (1 hour or even 1 minute later): depending on the code of the strategy, the results of some calculations could be different.

    MQ – The code instruct the system (prt and ig) to open a position when the daily price bar crosses over the upper billinger band, again very simple strategy.

    • Margin required on the trading account (no demo or backtest tests are made on this subject)

    MQ – CFD margin account is used.

    • Overnight and overweekend fees

    MQ – This cost is part of the real trading account.

    • Automatic adjustement of stop orders checked or not when launching the ProOrder

    MQ – This is not used in the code.

    • Minimal distance used in backtests for pending orders, not the same as in real trading, due to broker requirement

    MQ – One trade did open so it does work so expecting the other two to open as well but they did not.

    • Different contract size between backtests and live

    MQ – Contract size is the same for test and live trading.

    Because backtests are only tested on history *with no connection to live market* , you may encounter differences with real live trading environment subject to spread enlargement, slippage, etc.
    MQ – Yes I am aware of this. If the spread is a potential issue then do you have any coding suggestion, the code is shared above?
    #186454

    Check the rejection list, what is the error please?

    #186486

    See the 19 Jan entry for VIX – the first vix trade was created but missing the 20 and 21 Jan when the price crosses over the upper bollinger band just like on the 19 Jan. Since the trades didn’t get executed then there is no error messages. The code is very simple but please review it and advise.

    #186585

    Hi you mentioned earlier about Range – where can I find the maths for Range?

    #186669

    @nicolas, any update?

    #186685

    Why are you using Range for price conditions? Range is the difference between High and Low, but you are using it in Bollinger Bands instruction to check if the price crosses the bands? So you are comparing what happen on the chart (BB applied to Close), while you are using completely different values (BB applied to Range).

    Orders that your broker have not executed, check:

    1. orders rejection list
    2. ask your broker why if no orders rejection exist

     

    1 user thanked author for this post.
    #187073

    Na hi Nicolas

    to my post here:

    https://www.prorealcode.com/topic/systems-in-running-window-all-ticked/page/4/

    I would answer you here, because the answer fits better here.

     

    Whether I call a program “demo” or “live” should not matter. Discrepancies between the two (same) programs should not occur.

    There may be minimal exceptions that are system related and due to errors in the basic system.
    For example, “Live” it may happen that on Mondays 09.00, although the time is fixed pre-programmed in the trades, the start of the trades is shifted by several points. The trades open 09:00:00 and 09:00:01 … and later.
    If I then have only 1 trade in the “demo”, the open ofthe trades is (of course) on time.
    It gets more worse when, with the same simple programs as mine, the trades in the “demo” trades end in “winnings” and “live” are still open.
    And I’m not even talking about backtests…

    I am sorry for the weaknesses of the system, because a confidence in it can not grow.
    And yet I agree with you, other platforms are far far far worse.

    Translated with http://www.DeepL.com/Translator (free version)

     

     

     

     

    1 user thanked author for this post.
    #187112

    Hi John @JohnScher,

    What you describe there is easily dedicated to the spread alone. So if you would be able to solve that, you would have solved all of the issues you describe there.

     

    I am sorry for the weaknesses of the system, because a confidence in it can not grow.

    It is correct what you say there – it is about the system. The system as a whole, and not the one computer system like PRT and the other platforms.

    Once you know about these culprits (in the end pitfalls) you should try to exploit them instead of fighting it which won’t help you anyway. Not that I would know how to exploit it, but for example, not being there with a Market order (Limit almost the same problem) at the opening of the market, and you will have avoided the issue. Or the other way around : you want to make profit out of being there at the openings, then better judge the Backtest differently than you do know – meanwhile not being annoyed about the Demo acting different than Live (because remember, that is unavoidable).

    I hope this helps you a little …

    1 user thanked author for this post.
    #187179

    I have replied to the post https://www.prorealcode.com/topic/systems-in-running-window-all-ticked/page/4/ and thanks for sharing it. I agree that the learning curve for newbies is not easy and very slow even though I have been a fully time trader for about 18 months starting from scratch (no nothing about trading at all), and only just got into auto-trading about 2 months ago using TradingView Pine Scripting and PRT ProBuilder Language – the advantages of PRT is its integration with IG where I trade manually. I now have about  20 bots or automated scripts running live trades where each position size is $5,000 minimum and $100,000 maximum. IG does not provide a virtual trading account for PRT – PRT support should know this automatically without asking this question. I did a proof of concept for my VIX auto-trading system in TradingView using Pine and it works, so I am trying to get it to work with PRT/IG and I think the technical problem is in the integration, and when it comes to the integration/API and its support then the question to PRT / PRC is who own the API – is it PRT or IG because the owner should be the one who is responsible to fix any issues? Please advise.

    #187372

    Apologies, I just checked with IG and they do now offering a PRT paper account.

    #187375

    Yes I thought so. But yesterday I looked for it myself and can’t find it. What does it take to activate/use it ?

    #187396

    virtual trading / paper trading on IG is called DEMO, you should see that option in My IG

    #187451

    Thanks, but No … 🙁

    Not in the second attachment either, because the option for PRT lacks (see 3rd attachment for that, which is from the Live account).

    I recall far away that I’d need to ask IG to make me one (and I never asked).

    #187479

    My IG > Settings > ProRealTime > Enable ProRealTime for demo accounts

    1 user thanked author for this post.
    #187484

    After overlooking it 3 times again, I finally found it. Great thanks !

Viewing 15 posts - 16 through 30 (of 32 total)

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