One order each day?
Forums › ProRealTime English forum › ProOrder support › One order each day?
- This topic has 11 replies, 3 voices, and was last updated 8 years ago by grizzly.
Viewing 12 posts - 1 through 12 (of 12 total)
-
-
08/29/2016 at 6:06 AM #1235808/29/2016 at 6:13 AM #1236108/29/2016 at 6:20 AM #12362
Sorry.
I mean 1 entry/day, not necessarily exit the same day, that depends on the market.
But, if exit the same day, then the system should not try to enter the market again.
I guess what I am looking for is some sort of counter.
If no entry today, then buy. If 1 entry today already, then no buy. I just don’t know how to put it into code.
08/29/2016 at 6:59 AM #1236408/29/2016 at 7:10 AM #1236508/29/2016 at 1:45 PM #12387Try this as an example :
12345678910111213141516171819DEFPARAM CumulateOrders = Falsestarttime = 090000closetime = 170000Rule1 = time > starttime and time < closetime and not onmarket[0]Rule1b = (barindex-tradeindex>=(4*15)) //4 x 15mins = 24hoursRule2 = close>ExponentialAverage[200](close)Rule3 = close<ExponentialAverage[200](close)if Rule1 and Rule1b and Rule2 thenbuy 2 contract at marketendifif Rule1 and Rule1b and Rule3 thensellshort 2 contract at marketendifset stop ptrailing 10008/29/2016 at 1:54 PM #1238808/30/2016 at 11:05 AM #1245908/31/2016 at 8:35 AM #12511Exchanging TIME for CURRENTTIME worked instead:
Rule1 = currenttime > 090000 and currenttime < 170000 and not onmarket[0]
Rule1b = (barindex-tradeindex>=(4*15)) //4 x 15mins = 24hoursif rule1 and rule1b and … then
buy 1 contract at market
endif
08/31/2016 at 9:00 AM #1251208/31/2016 at 10:11 AM #1251708/31/2016 at 11:26 AM #12520 -
AuthorPosts
Viewing 12 posts - 1 through 12 (of 12 total)
Find exclusive trading pro-tools on
Similar topics: