Support Board
Date/Time: Thu, 26 Dec 2024 17:29:30 +0000
[User Discussion] - Multiple Entries
View Count: 2047
[2015-12-15 11:39:08] |
User59228 - Posts: 47 |
Hi, i will test a System, which buy max. one time a day, when a buy Signal occurs. The Position will be completely sold, when there is a sell Signal. When i allow multiple entries, then the System buy several times a day. This ist why i need a formula to control this. When i disable the daily trades with j28=j52>1, then the System buy more positions when there are no Exit before, because only when there are an Exit the cell j52 were counted. Are there a possibility to Limit only the daily buy signals ? Thank you. |
[2015-12-15 15:27:12] |
Sawtooth - Posts: 4143 |
Try this in J28: =AND(J8=0,INT(J41)=INT(J42)) |
[2015-12-15 18:17:52] |
Sierra Chart Engineering - Posts: 104368 |
Have a look at using Daily Total Trades or Position Quantity: https://www.sierrachart.com/index.php?page=doc/doc_SystemsAlerts.php#CellJ52 https://www.sierrachart.com/index.php?page=doc/doc_SystemsAlerts.php#CellJ5 Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2015-12-15 19:27:25] |
User59228 - Posts: 47 |
Hi Tom, thank you for answer, but with this formula the System buys several times a day. Can you tell me what happens with the formula "INT(J41)=INT(j42)) ?? Date Time Of Last Edit: 2015-12-15 19:49:41
|
[2015-12-15 20:48:42] |
Sawtooth - Posts: 4143 |
The formula will disable autotrading if the Last Entry Trade DateTime (J42) is the same day as the chart's current Last Bar End DateTime (J41). The first trade of the day is allowed because J42 will not have today's date. Once in a trade, it will have the same date as the current day. The J8 reference allows an exit in the same day. When the first trade of the day exits, J28 will go TRUE and no other trades are allowed in the same day. To reiterate: 1) Before the first trade of the day when you are flat, only the first portion of the formula is TRUE so the result is FALSE: Autotrading is not disabled so an entry is allowed. 2) When in the first trade of the day, only the second portion of the formula is TRUE so the result is FALSE: Autotrading is not disabled so an exit is allowed. 3) After exiting the first trade of the day, both portions of the formula are TRUE so the result is TRUE: Autotrading is disabled and no other trades are allowed in the same day. 4) Once J41 crosses midnight into the next day, only the first portion of the formula is TRUE so the result is FALSE: Autotrading is not disabled so an entry is allowed. This formula assumes the following: -'Allow Multiple Entries in Same Direction' is set to No -You are not using Reversals -You are not scaling in The Serial DateTime format counts the date and time from 1/1/1900 where the date is the integer and the time of the day is the decimal. The INT function removes the time of day and leaves the date. Date Time Of Last Edit: 2015-12-15 23:59:11
|
[2015-12-15 22:54:45] |
User59228 - Posts: 47 |
ok, thank you very much for this explanation. It is very helpful to know such possibilities. Because i want to use multiple entries (buy every day 1 unit additional) it is not the solution for this problem but good to know for other trade-system-developments. |
[2015-12-16 00:49:38] |
Sawtooth - Posts: 4143 |
In that case, try this: 1) Add the Trading: Total Quantity Filled study, and check Hide Study. The formulas below assume its output is in column AA. 2) In a spare Formula Column, e.g. column P, put this in cell P3: =AA3>AA4 This marks TRUE the bar when an entry or exit occurred. 3) Put this in cell H1: =IF(AA3=0,0,INDEX(A3:A1002,MATCH(TRUE,P3:P1002,0),1)) This returns the DateTime from column A of the most recent TRUE in column P. 4) Put this in cell H2: =INT(J41)>INT(H1) This compares the date of the most recent fill (H1) with the date of the last chart update (J41). It will return TRUE if J41 is a later date than H1. 5) Include a reference to H2 in your entry K3 formula: =AND(H2,YourEntryConditions) This looks for a TRUE in H2 before your other entry conditions can be TRUE. 6) Leave J28 blank, unless you want to use it for other reasons. This assumes the following: -'Allow Multiple Entries in Same Direction' is set to Yes Date Time Of Last Edit: 2015-12-16 05:09:19
|
[2015-12-16 05:08:33] |
Sawtooth - Posts: 4143 |
Previous post edited
|
[2015-12-16 11:17:45] |
User59228 - Posts: 47 |
ok, thank you. I tried this, but the System bought one additional Position with every new bar.
|
[2015-12-16 19:20:10] |
Sawtooth - Posts: 4143 |
Is each bar a Daily bar? If so, this is expected.
|
[2015-12-16 20:00:54] |
User59228 - Posts: 47 |
no,it is an intraday bar. I think it works now with this formula in j28: =or(and(j29=false,j53>=1,j53>j54),j52>=1) J29 is the Exit condition. |
To post a message in this thread, you need to log in with your Sierra Chart account: