Manual entry with Automated exit?
Forums › ProRealTime English forum › ProOrder support › Manual entry with Automated exit?
- This topic has 20 replies, 6 voices, and was last updated 3 years ago by GraHal.
-
-
05/10/2018 at 3:20 AM #70116
Hi
I am starting to get to grips with prorealtime, I am not at the stage where I want to do full automated trading but I would like to enter trades manually and then program an exit algorithm rather than rely on alerts that require me to get up in the middle of the night to exit trades, or I end up losing profit if I am indisposed. For example if I am Long and the price crosses under the 50 Moving Average I want to exit Automatically.
Programing an exit when the price gets near my guaranteed stop would also be nice so the stop is not triggered and I don’t have to pay the stop premium.
Right now if I do not define an automated entry I get the msg “Trading systems must contain at least one instruction to enter the market” and it does not work.
Any ideas?
Thanks in Advance
05/10/2018 at 12:39 PM #70126<topic moved to automatic trading forum>
Managing manual orders with automated trading program is still not possible. Would be a great improvement! I encourage everyone to post this suggestion with into the ProRealTime suggestion box right there: https://www.prorealtime.com/en/contact?suggestion=1
05/10/2018 at 12:55 PM #7013005/10/2018 at 1:03 PM #70132Also there is a Thread on here with Code to open an AutoTrade the instant the System starts and then of course you can have your exit Strategy coded into the System?
But if you are anything like me, your exit strategy / levels changes depending on what the candles look like (momentum-wise) prior to reaching levels … as in big fat red / green volume weighted candles or thin candles etc. But all this could be coded in of course
05/10/2018 at 3:08 PM #70145Thanks for the help.
Correct me if I am wrong but doesn’t the “associated trigger” only allow you to enter a trade? There is a option to Sell or Buy but no option to Close a position.
Entering a position when the strategy starts would be good workaround i guess, I did a search but could not find the thread in question, you have a link?
I geuss it will just depend on a variable being true at the start but not at any other time.
05/10/2018 at 3:23 PM #70148Yeah you are prob correct re the Alert Function not able to close, I’ll have a think and a closer check etc.
Re Alert, you could set up a text alert on the IG interface when a new position is opened (and new trade closes existing trade) so then you wake up and close that new position also … hopefully for the loss of spread + a few points and maybe even a gain sometimes so it be swings and roundabouts?? Just an idea, maybe a daft idea but it may spark better idea in your / others minds?? 🙂
Anyway, here is the link to my other suggestion …
05/10/2018 at 5:51 PM #70161Thanks for the help.
Correct me if I am wrong but doesn’t the “associated trigger” only allow you to enter a trade? There is a option to Sell or Buy but no option to Close a position.
Entering a position when the strategy starts would be good workaround i guess, I did a search but could not find the thread in question, you have a link?
I geuss it will just depend on a variable being true at the start but not at any other time.
about alerts with triggers
you need to disable “force open” in settingsif you have 1 buy open then sell 1 to close
if you sell 2 then you should have 1 short open
but also use a hard stop (on server) when using alerts to close trades
1 user thanked author for this post.
05/11/2018 at 12:49 AM #70168Daedalus my understanding of your request is that you want to make 1 entry or start the system manually and then let the automation take over?
I do this by:
12345678910IF NOT ONMARKET THENBUY x CONTRACTS AT MARKETENDIF// the rest of your code for exits and stops here.// finish with this which will ensure the Strategy is stopped after each closeIF strategyprofit <> 0 THENQUITENDIF1 user thanked author for this post.
05/11/2018 at 8:13 PM #7022405/11/2018 at 11:33 PM #70231I ended up using the code above because it does not seem to be possible to have an alert that is only triggered once. For example if I entered with buy 5 and set an alert that will sell 5 to close there is nothing to stop it from selling 5 again when the alert condition is true again (for example price crossing 50 moving average).
At least with davids code I can quit so the condition is not triggered again.
1 user thanked author for this post.
05/14/2018 at 2:05 AM #70319For some reason the code does not run when the automated system is started but when the first bar completes which means that if my system is configured to use 5 min bars I have to wait up to 5 minutes before it will place the trade which is unacceptable to me as the price may have moved to an undesirable entry point by that time.
Is there a way to get the code to run before the first bar completes?
05/14/2018 at 11:19 AM #7034105/14/2018 at 11:23 AM #70342there is nothing to stop it from selling 5 again when the alert condition is true again
You could set a second Alert related to time … see attached.
12/23/2020 at 12:28 PM #15497512/23/2020 at 1:22 PM #154986 -
AuthorPosts
Find exclusive trading pro-tools on