Is it possible to build a semiauthomatic trading system with prorealtime??

Forums ProRealTime English forum ProOrder support Is it possible to build a semiauthomatic trading system with prorealtime??

Viewing 12 posts - 1 through 12 (of 12 total)
  • #174787

    Hello,

    I want to know if it is possible to create a semiauthomatic trading system. The system would be as follows:

    • I would mark a support zone. When the price went below it, a BSLO order would be insert in case the price went above that area again, with a small stop loss.
    • At a small % it would trim the position and then let it run.
    • in case it gets stopped out, it would enter the the BSLO order again.

    I started looking at the probacktesting and I’m not sure if such a method is possible since it seems to only be possible to make completely authomatic trading systems based in indicators and such.

    maybe it’s the proreal order part? I don’t know how to access that, since at the indicators there’s only the “backtesting tab”

    Let me know if that’s possible and if you could point me out to some parts of the manual etc.

    Thank you

    #174788

    also, this system would be applied only to the instruments I wanted, when i define an area of support. It is not to be traded always to an index or such, but to be applied to different stocks.

    #174791

    It would be useful to define BSLO Order … just so we are all clear? 🙂

    #174796

    Apart from clarifying what a BSLO order is (I never heard of it before), manual and automated trading cannot be combined.

     

    #174823

    BSLO: means Buy stop limit order, to avoid gaps. But I would be fine with buy stop orders.

    I thought that manual and automatic can’t be combined…

    But can you make an automatic system not based on indicators but based on lines that you draw? The method I’m using is based on undercut and rally, it can aso be an undercut and rally of a moving average, which is also a good method, but it is not the best one.

    #174846

    No, from any code you can’t access what’s drawn on your chart.

    You cannot automate a manual trade, but you can make an automatic trade manual by simply changing any value, Stop Loss or Take Profit, provided you have set the option to let trades run after a strategy is shut down. Because any time you manually change an open position, the strategy that opened it will immediately be interrupted.

     

    #174859

    maybe it’s the proreal order part? I don’t know how to access that, since at the indicators there’s only the “backtesting tab”

    If you are working with the IBKR (broker) version, then there is no AutoTrading (yet). Only with IG there is. So maybe that is what you encounter ?

    #174860

    I want to know if it is possible to create a semiauthomatic trading system.

    • I would mark a support zone. When the price went below it, a BSLO order would be insert in case the price went above that area again, with a small stop loss.

    If you make a Strategy (Autotrading program) which is able to enter the market (take a position), then it can be YOU who starts the Strategy when the price has entered the support zone. So notice that in this case it will be YOU who starts the program in the first place.
    Next, the program will take a position (buy shares etc.) based upon the algorithm you programmed. Theoretically this can be “never” after all (because the algorithm does not like what it sees regarding price development – it may run out of the support zone again etc.) and you’d need to Stop the Strategy manually (at least I think this can not be done automatically – but not sure).
    Notice that when you Stop the Strategy, it is a parameter choice to let the position run, and which from then on allows for manual manipulation again, or that the position is Exited right away.

    When the program has taken a position :

    • At a small % it would trim the position and then let it run.
    • in case it gets stopped out, it would enter the the BSLO order again.

    the program could do that, but the second subject above does not comply to how you started out with the “support zone”. It may not be in that zone any more.

    I hope this got you thinking, because in the end the program could do all, if it only could determine the comfort zone.

    No, from any code you can’t access what’s drawn on your chart.

    This is correct for when you draw the lines (etc.) yourself. But as soon as the program is able to draw the line (it could be an average and 1000 things more), your program will know where that line is. So in the end, the program can do all and should do all. However :

    but you can make an automatic trade manual by simply changing any value, Stop Loss or Take Profit, provided you have set the option to let trades run after a strategy is shut down

    This may not be fully clear to you because the “automatic trade” here lies in the fact that setting a Limit on e.g. a Buy order is a kind of automatic trading as well. You set it, go to sleep and tomorrow you may be rich or poor. You can set Limit orders for both buy and stops at the same time, and it works if only the price swings from the one to the other. Anyway … it looks that you ant to do *that* instead of making a program for a Strategy and it would do all kinds of things beyond what you currently know (?). To me it looks like you want to start with a trailing Buy order (this trails the price lower and lower until it goes up again and then buys). Notice, however, that on the PRT-IG platform I could not get this to work reliably. On PRT-IB it works perfectly. Example :

    • Set Trailing Buy (with your own set distance).
    • When the position is taken, set a Trailing Stop at the moment you see sufficient profit and again with the distance of your liking.
    • With the notice that your trailing stop can be a “Reverse” because you entered 200 pieces while the position was for 100, at the moment the stop occurs you are immediately in a Short by 100 for the reverse direction. When this position has been taken, you go back to step one and place a trailing Buy again (which then looks as a regular Trailing Stop with the difference you could again set it to 200 for reversal).

    Fun ?
    I think so.

    1 user thanked author for this post.
    #174892

    Thank you. I should write code then that determines the support zone I want the program to buy after it has been undercut. That is very complicate since as of now I’ve been doing a discretionarily. The setup is the undercut and rally from Gil Morales on strong momentum/growth stocks.

    I can’t do it with limit orders, because you buy when it reverses on a support zone after undercutting. Also, this strategy uses a minuscule stop. Moraes uses the same price as it was bought. I use last low on a 5 minutes chart or so. So many times you have to enter the position 3-4 times before it resolves higher or lower. That’s why I wanted a program, so I don’t have to babysitting. But you gave me a lot of ideas. If I can determine Lowest from weekly for instances + moving averages, than can definitely determine most interesting support zones. I will also look for code on support zones on the library. Anyone has them?

    #174984

    I just realized that I can let know the program where my support zone with the command lowest(n). So i simply need to put the n and change it every time I want it to be working.

    Someone mentioned that there’s a command to stop the trading system but not close the position. Which is it? Would it be something like:

     

    If Quit then not sell

     

    This is the code I have so far, probably very wrong but I’m a noob. Program says there are missing characters in line 4 and 6 (no idea which ones), and I have several doubts. First, if when price goes below lowest 16, it will put a buy stop order or it will wait for the bar to close (daily bar I understand). Second, if price moves up and it sells partials, if the stop loss will be reduced in size or I have to tell the program that too. Third if I can change the fixed stop to a trailing stop after selling the third partial, and if how I put it is correct:

     

    If someone can give me hand I appreciate, but no worries otherwise.  Here the code:

     

    Support = Lowest[16]

    // Condiciones para entrada de posiciones largas
    IF NOT LONGONMARKET AND Support > close
    SET BUY 1000 CASH STOP AT Support
    ENDIF

    // Condiciones de salida de posiciones largas
    If LongOnMarket AND close = Support*1,01 THEN
    SELL 200 cash AT MARKET
    ENDIF

    If LongOnMarket AND close = Support*1,05 THEN
    SELL 200 cash AT MARKET
    ENDIF

    If LongOnMarket AND close = Support*1,1 THEN
    SELL 200 cash AT MARKET
    ENDIF

    IF LongOnMarket AND close = Support*1,1 THEN
    SET STOP %TRAILING 0.2
    endif

    // Stops y targets: introduzca aquí sus stops de protección y targets de beneficios
    SET STOP %LOSS 0.2

     

    #174988

    to stop the trading system but not close the position

    That option is in Settings > Trading > Automatic Trading

    #174992

    That option is in Settings > Trading > Automatic Trading

    And with that setting as you want it, press the red stop sign you see in the attachment.

Viewing 12 posts - 1 through 12 (of 12 total)

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