Emergency close positions in loss . will it work ?
-

so as you can see i have a formula on 'on init' event that gets my account equity at the beginning and calculates 90% of it.

now for on tick event i have a condition where 90% of my equity is more than my current equity . so ihave a close positionsmy question is .. will this work ? cuase sometimes things appear normal but dont work the way we intend them to
-
probably, account equity x 0.9 with no adjust will work (is the best way to get 90%)
-
@jstap
yeah both would work . what you said though was less complicated
but my real question was with on init event . is this the way it works ? also I have another question .
you see some blocks need some other blocks before them in order to workfor example "modify variable" needs "for each position" before it obviously to modify based on position properties . but what other blocks need blocks before them ?
like I've seen for conditions there are if positions and no position . thats why I added a pass at first and then put my formula . would it work without the pass ? and what about others ? I haven't found much in the docs
-
Add a shared link rather than pictures (so inside blocks can be seen). On init like that will fix the result of the calculation in the variable, then you can use on tick. Pink above modify will put anything from a pink loop into the variable, Single blocks don't work so a pass would be needed, you can avoid the pass if you already have blocks in the tab by connecting above or below, things like a comment block are not affected by another blocks output, and don't commit an output them selves, So the use of a block above or below depends on weather they can be affected or cause an effect with what they are connected to.
-
@jstap thanks .. got it 🤍
-
