Buy at every drop
Forums › ProRealTime English forum › ProOrder support › Buy at every drop
- This topic has 11 replies, 4 voices, and was last updated 4 years ago by
Boagz07.
-
-
02/05/2021 at 6:44 AM #160400
So I’m pretty new to this whole thing, what I wanted to do was open a new position every time a price goes down. I assume that I have to compare the latest price to the previous one but I could be wrong. Also in doing it this way would there be any restrictions on what timeframes it would work or would it allow me to do it from 1 second all the way through to the day? I have had a play around but I’m not getting anywhere, any pointers would be appreciated.
02/05/2021 at 9:05 AM #160401The below code place a pending limit order x points (step) below the last opened price. It will accumulate orders for ever, there is no coded exit, you’ll have to add your own.
123456789101112defparam cumulateorders=truestep = 20if rsi[14] crosses over 50 thenbuy 1 contract at marketbuy 1 contract at tradeprice-step*pointsize limitendifif longonmarket thenbuy 1 contract at tradeprice-step*pointsize limitendif02/05/2021 at 9:19 AM #160407You can use any TF, at your choice, since, say, a 5% drop is such on a Daily TF and 1-second TF.
There you go:
123456789101112Defparam CumulateOrders = TrueOnce MyPrice = close //First price to startOnce PerCent = 5 //5% dropIf Not OnMarket and OnMarket[1] thenMyPrice = closeEndifIf close <= (MyPrice * (1 - (PerCent / 100))) thenMyPrice = closeBuy 1 contract at MarketSet Stop pLoss 100 //100-pip SLSet Target pProfit 200 //200-pip TPEndif02/05/2021 at 9:21 AM #160408AhAhAh…. two is always better than one!
02/05/2021 at 10:16 AM #16042002/08/2021 at 3:02 AM #160615It seems to work close to how I would like in back test but there are some results that don’t make sense to me.
However as soon as I try it out on a demo account I keep getting an error message about stop limits despite removing all of the stops. I don’t know if I am over or underthinking the code or I just don’t know wtf I am doing.
I basically want it to ignore market conditions
and then execute the following flow
1234IF //Price drops 1 Point ---(either of these should work)--- IF Current price < previous price// THENbuy x Contract at MarketSET TARGET pPROFIT xENDIFI don’t want it to close any positions unless it hits that profit target or I manually go in and close the.
Also is there a way to remove the number of trades that can be made per day or increase it over 1000?
02/08/2021 at 9:35 AM #160632Brokers have minimum distances and it is not possible to place orders under these minimum distances. Nothing can be done to change this.
Brokers also have a maximum number of trades that can be placed in a day – this is to save you from yourself and to save them from having to cope with high frequency trading. Nothing can be done to change this.
Unless you have a bank roll the size of a hedge funds then I would avoid your trading idea as one day you will buy your first entry at the top just before a market crash and then continue buying all the way to the bottom only stopping when all your money runs out.
Note: Please follow the forum rules and:
- Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.
Your post has been edited.
02/08/2021 at 9:30 PM #160754I have already taken into account the possibility of that happening and will be limiting the amount of open contracts at any one time
As for the other issues I have duplicated the system manually it’s just an absolute pain doing it that way hence the automation
02/08/2021 at 9:54 PM #160756I have already taken into account the possibility of that happening
The possibility of it happening is 100% – and the only way to take that into account is to have a bank account that you don’t mind emptying… or to be trading using other peoples money.
They call it ‘catching a falling knife’ for a very good reason.
Have you even considered how much margin is required to trade in such a way? You will get a margin call (or lots of margin calls!) long before your account is empty and your trades will be closed out one by one at a loss by the broker.
02/09/2021 at 1:21 AM #160763Got to risk it for the biscuit mate and I get where your coming from however the most I would be loosing using my idea would be 70k which I am prepared to dust a couple of times and it would only his that point if the entire market went to zero, which is an absolutely catastrophic event and I’m sure the least of anyone’s problems will be the money at that point. I’m certainly not going into this blind and I will be running a lot of tests before I actually put my money on the line.
02/09/2021 at 9:22 AM #160771If you are insistent on giving money away then this discussion that I started a while back might be of interest to you:
https://www.prorealcode.com/topic/catching-a-falling-knife-ideas/
02/10/2021 at 5:31 AM #160885 -
AuthorPosts
Find exclusive trading pro-tools on