Support Board
Date/Time: Sun, 24 Nov 2024 04:38:00 +0000
[User Discussion] - IF IF IF Then Statements
View Count: 2596
[2013-09-06 13:58:13] |
100 - Posts: 147 |
Hello. Yesterday, someone recommended I create a 'use once' statement, using IF(condition,B3,IF(condition,B3,0)). At least this is how I think I should write it... I tried this idea, and expounded it: IF(condition,B3,IF(condition,B3,IF(condition,B3,IF(condition,B3,IF(condition,B3,IF(condition,B3,0)))))). The condition should be working. It is written correctly and the conditions are being met. However, the statement if I am using, seems to fail to take trades. & glitches out often, creating trades which are sometimes taken and stopped out almost immediately after. Am I approaching this "use once" idea from the wrong coding perspective? Is there a better way to write an IF IF IF IF Then statement? Thanks again to everyone on these forums, -100. (Old Post on 'use once' statement: Use Once Command?) Date Time Of Last Edit: 2013-09-06 14:02:17
|
[2013-09-06 16:41:50] |
Sierra Chart - Max - Posts: 5730 |
What you are creating is an "If, else if, else if, then" statement, where the 1st condition that is met is used and I am not sure what it has to do with "use once". The stability will depend on the conditions that you are using. We cannot really help without knowing the full formula used, and what the intended result is. Sierra Chart Support |
[2013-09-06 21:04:22] |
100 - Posts: 147 |
The general intention of the formula is to apply an entry once per bar, every bar (in line J22-J25), until the condition is met. -Once a K3 or M3 condition is met, the formula under J-22 / J-24 will activate. -Its activation involves looking to create an entry. If the conditions are met, the program will buy at that same bar's high/low. If the Conditions are not met, it will try at the next bar's high or low. & if that bar's conditions are not met, etc. So far all I can get the formula to do is enter a trade and then exit in the next bar. (even though I disabled stops)... I do not understand how to create the code for this. Would it be wise to ask for help via phone support? How can I better learn what I am trying to do? |
[2013-09-07 22:06:41] |
100 - Posts: 147 |
bump?
|
To post a message in this thread, you need to log in with your Sierra Chart account: