Support Board
Date/Time: Mon, 17 Mar 2025 11:35:07 +0000
[Programming Help] - Programming Spreadsheet - Entry if DMI difference is > 5
View Count: 437
[2022-08-17 20:21:03] |
GG - Posts: 20 |
Thanks for your help, I have a system that enters upon VWAP crossing of 1SD and exits at either 0SD or 2SD. I am adding a condition where if the difference between the Directional Movement Index (DI+ and DI-) is larger than 5 then it doesn't enter. BuyEntry =AND(CROSSFROMBELOW(ID0.SG4@3:ID0.SG4@4, ID5.SG5@3:ID5.SG5@4),((ID9.SG2-ID9.SG1)<5)) SellEntry =AND(CROSSFROMABOVE(ID0.SG4@3:ID0.SG4@4, ID5.SG4@3:ID5.SG4@4),((ID9.SG1-ID9.SG2)<5)) It is entering every buy/sell signal regardless of the DMI. Also how would I go about making sure it only enters between 0 and 5, so that it doesn't enter if the value comes out negative? Thanks again Grace |
[2022-08-18 12:43:22] |
Sawtooth - Posts: 4185 |
The DI+/DI- subgraphs need a @3 row reference: BuyEntry =AND(CROSSFROMBELOW(ID0.SG4@3:ID0.SG4@4, ID5.SG5@3:ID5.SG5@4),((ID9.SG2@3-ID9.SG1@3)<5)) SellEntry =AND(CROSSFROMABOVE(ID0.SG4@3:ID0.SG4@4, ID5.SG4@3:ID5.SG4@4),((ID9.SG1@3-ID9.SG2@3)<5)) |
To post a message in this thread, you need to log in with your Sierra Chart account: