Opening of a new trade immediately after the closure of the previous one
5 replies
Sweatstrad
3 years ago #281644
How to program: in case of a profitable trade, a new position would be opened immediately in the same direction, and in case of a loss, a position would be opened in the opposite direction? This would create an infinite loop of trades, so the condition would be if there are more losses than profits, stop trading.
I want to try this to capture the trend when the market opens.
Thank you for your help.
Pro jistotu dodávám, že otázka je i v češtině:
Jak prosím naprogramovat, aby se v případě ziskového obchodu ihned otevřela nová pozice ve stejném směru a v případě ztráty se otevřela pozice v opačném směru? Tím by vznikla nekonečná smyčka obchodů, takže podmínka by byla, pokud je více ztrát než zisků, konec obchodování.
0
Tomas Matejka
3 years ago #281669
Hello,
this can be done easily. What if the strategy keeps hitting stop-losses? When would you want to stop opening new trades?
0
Sweatstrad
3 years ago #281676
I would put a condition in there that if there are several stop-losses in a row, end of trading. And if there are several profits, that too. At the moment I don’t know how to run it exactly, I’m learning how to program in SQX, at least the basics.
I would like to have a strategy that would have at least half a chance of making money. I’ve been dealing with SQX for a few months now, but I don’t have any results that can be put into a real account yet 🙂 but maybe I’ll learn. Lots of options and I don’t know where to start.
Thank you for your help.
0
Sweatstrad
3 years ago #281751
I would be glad if someone could at least write me the logic of how I can immediately open a trade in SQX the moment the previous one closes.
0
Tomas Matejka
3 years ago #281770
Hi,
you need to setup this using multiple conditions in AlgoWizard
First you need a condition that check last trade Closed P/L and store last trade direction into another variable (+1 for last trade long, -1 for last trade short)
Second you need to “count” profit or losses in a row. Such counters would be reset to 0 (zero) once a profit comes after a loss or opposite
Also make sure you setup all condition to be triggered “on each tick” so the trades are being open immediately after the previous trade is closed
0
Sweatstrad
3 years ago #281772
Thank You. I’ll try to make something out of it.
0
Viewing 5 replies - 1 through 5 (of 5 total)