3 trades per day
Forums › ProRealTime English forum › ProOrder support › 3 trades per day
- This topic has 16 replies, 5 voices, and was last updated 5 years ago by Razz.
-
-
12/17/2019 at 9:40 AM #115024
Hi
I want my trading system to only do 3 trades a day, what do I have to do?
I don’t know what to do next
Thank you
12345678once Tradetag=0If onmarket thenTradetag=dateendifIf not onmarket and time>= Startzeit and time < Endzeit and Tradetag<>date and Spannepoints < MaxBox thenBUY Position Lot AT Hi+L StopSellshort Position Lot AT Lo-S Stop12/17/2019 at 10:29 AM #115028Try this, it should work.
12345678if intradaybarindex = 0 thencountposition=0endifcondnbposperday=countposition <= 3if not longonmarket and condition and condnbposperday thenbuy 1 shares at marketcountposition=countposition+1endif1 user thanked author for this post.
12/17/2019 at 10:39 AM #115030Mauro – your suggestion only works for at market orders. Razz’s example uses stop orders and so it is that a trade can be opened and closed within a candle. This means that simply adding one to a count does not work and using COUNTOFPOSITION does not work as the count would be zero at the candles close in this case.
We need to check both COUNTOFPOSITION and STRATEGYPROFIT at the candles close. Nicolas has a code snippet which hopefully he will share again here soon.
12/17/2019 at 10:39 AM #115031The problem is that Razz is using pending stop orders and so you can’t increase an order count each time you set them, but when they are actually triggered.
Try with this snippet:
1234567891011if intradaybarindex=0 or day<>day[1] thencount=0endifif ( (not onmarket and onmarket[1] and not onmarket[2]) or (tradeindex(1)=tradeindex(2) and tradeindex(1)=barindex[1] and tradeindex(1)>0) or (not onmarket and onmarket[1])) thencount=count+1endifif count<3 then...endif12/17/2019 at 10:40 AM #11503212/17/2019 at 10:44 AM #115034“soon” means at the same exact time Vonasi 😆
I knew you were fast but not that fast!
12/17/2019 at 11:08 AM #115038Thank you for your help, I hope I entered it correctly. I watch how it works.
123456789101112131415if intradaybarindex=0 or day<>day[1] thencount=0endifif ( (not onmarket and onmarket[1] and not onmarket[2]) or (tradeindex(1)=tradeindex(2) and tradeindex(1)=barindex[1] and tradeindex(1)>0) or (not onmarket and onmarket[1])) thencount=count+1endifif count<3 thenTrade=1endifIf not onmarket and time>= Startzeit and time < Endzeit and Trade=1 and Spannepoints < MaxBox thenBUY Position Lot AT Hi+(Spread/2) StopSellshort Position Lot AT Lo-(Spread/2) StopThank you
12/17/2019 at 11:56 AM #115042It will not work as you never reset “Trade” to 0. You should do it like this:
1234567891011if intradaybarindex=0 or day<>day[1] thencount=0endifif ( (not onmarket and onmarket[1] and not onmarket[2]) or (tradeindex(1)=tradeindex(2) and tradeindex(1)=barindex[1] and tradeindex(1)>0) or (not onmarket and onmarket[1])) thencount=count+1endifIf not onmarket and time>= Startzeit and time < Endzeit and count<3 and Spannepoints < MaxBox thenBUY Position Lot AT Hi+(Spread/2) StopSellshort Position Lot AT Lo-(Spread/2) Stop12/17/2019 at 12:01 PM #115043I probably did something wrong, in the picture all 3 systems. 2 trades are not ok
12345678910111213141516171819202122if intradaybarindex=0 or day<>day[1] thencount=0endifif ( (not onmarket and onmarket[1] and not onmarket[2]) or (tradeindex(1)=tradeindex(2) and tradeindex(1)=barindex[1] and tradeindex(1)>0) or (not onmarket and onmarket[1])) thencount=count+1endifif count<3 thenTrade=1endifIf not onmarket and time>= Startzeit and time < Endzeit and Trade=1 and Spannepoints < MaxBox thenBUY Position Lot AT Hi+(Spread/2) StopSellshort Position Lot AT Lo-(Spread/2) StopENDIF// Stops und TargetsSET STOP pLOSS Spannepoints*ySET TARGET pPROFIT Spannepoints *x12/17/2019 at 12:10 PM #11504512/17/2019 at 1:13 PM #11506512/17/2019 at 1:27 PM #11506712/17/2019 at 3:08 PM #115086Nicolas I work limited to 2 trades per day, the results have changed very well. less profit trading but more profit. I will continue to watch the whole thing and if I really run the strategy in the real account a programmer should look over there.
Nicolas,Vonasi,Mauro
Many thanks for your help
1 user thanked author for this post.
12/17/2019 at 3:57 PM #115099Good afternoon. I am sorry that I get involved in the Razz issue. I have a similar system in which instead of limiting the number of daily orders, I limit the number of lost orders.
I comment because your system reminds me of one that I have, based on the Mark Fisher ACD system. In this system, the maximum and minimum are set in a time range, but those values are not entered, but the maximum amount is added by the percentage of the average true range value of the previous day and the minimum is subtracted That same percentage. This prevents us from false breaks.
As you can see on the screen you have said you say that the last operation is not allowed, however, notice, that it returns almost to the initial position (that is, at the minimum of the range), then go back down and have a very good operation.
It is simply an idea.12/18/2019 at 1:53 PM #115167Nicolas the code for the 3 trades works, but unfortunately the entry conditions after the 1 trade no longer work. Entry should only be if it goes over the High Line or under the Low Line. If I use crosses over / under it only starts with the next candle. Do you have a solution?
Thank you
12345678910111213141516171819202122232425262728once Bars=60once Hi=0once Lo=0If time = 090000 thenHi=highest[Bars](high)Lo=lowest[Bars](low)endifSpannepoints=(Hi-Lo)/pointsizeMaxBox = MBif intradaybarindex=0 or day<>day[1] thencount=0endifif ( (not onmarket and onmarket[1] and not onmarket[2]) or (tradeindex(1)=tradeindex(2) and tradeindex(1)=barindex[1] and tradeindex(1)>0) or (not onmarket and onmarket[1])) thencount=count+1endifIf not onmarket and time>= Startzeit and time < Endzeit and count<3 and Spannepoints < MaxBox thenBUY Position Lot AT Hi+(Spread/2) StopSellshort Position Lot AT Lo-(Spread/2) StopENDIF// Stops und TargetsSET STOP pLOSS Spannepoints*ySET TARGET pPROFIT Spannepoints *x -
AuthorPosts
Find exclusive trading pro-tools on