Maximize profit DAX 1 minute
Forums › ProRealTime English forum › ProOrder support › Maximize profit DAX 1 minute
- This topic has 16 replies, 5 voices, and was last updated 4 years ago by ladis.
-
-
12/12/2019 at 4:45 PM #114754
Hello to you all,
I hope that someone here can help me with the following problem, because I don’t know how to code it.
I trade dax futures in the 1 min frame.
When my indicator gives the right signal, I buy 1 future long.
If the index drops more than 30 point below my entry point I buy another one. If it drops more than 60 point below the first entry point I buy another one
My TARGET pPROFIT is pointofpositionprice +14 pips.
It allways reaches this target, but sometimes I first have a drawdown of 100 pips before it does so and sometimes it crushes through the 14 pips and keeps on climbing.
So I would like to implement a trailingstop SET STOP pTRAILING 14
I tried different methods, but it doesn’t work.
Below is what I have now.
In attachment I try to explain what I mean. I appologise if I didn’t make myself clear.
Many thanks in advance!
All the best with your coding and trading!!!
123456789101112131415161718192021222324DEFPARAM CumulateOrders = trueindicator1 = CALL "long DAX 1 Beste"[28,7,35,19](close)c2 = (indicator1 >= 2)if time>081000 and time<212500 AND ONMARKET = 0 thenIF c2 THENBUY 2 SHARES AT MARKETENDIFendifif longonmarket and countofposition = 2 and positionprice - close > 30 thenbuy 1 shares at marketendifif longonmarket and countofposition = 3 and positionprice - close > 50 thenbuy 1 shares at marketendifif longonmarket and countofposition = 4 and positionprice - close > 100 thenbuy 1 shares at marketendifSET TARGET pPROFIT +1412/12/2019 at 10:35 PM #114783Did you try looking in the Snippet Link Library … link to a Topic containing 4 Trailing SL below (it’s Log 11 in the Snippet Library)
https://www.prorealcode.com/topic/trailing-stop-and-breakeven-codes/#post-93285
Let us know how you get on please?
EDIT / PS
There are several more rows containing Trailing Stops in that Link Library … use the ‘Find’ function on Trailing.
1 user thanked author for this post.
12/12/2019 at 11:02 PM #114785I’ve just ‘named as Type’ … 10 x Trailing Stop snippets … filter on column B on the Link below
1 user thanked author for this post.
12/12/2019 at 11:15 PM #11478712/13/2019 at 8:25 PM #114842Dear GraHal,
I tried the different trailing setups from the snippet link library, but they never give an outcome as good as just setting the pPROFIT +14.(attachment 18/12/2018 (when PRT started to load dayround FDAX) till today)
The problem is that quite some times the index goes a bit in the good direction and then falls back so the (trailing) stoploss is hit. If I set the trailingstart too high( >20), the results drop (trail 1) so I don’t know how to adjust this.
When I trade manually and when the index > 14 point above start, I set a trailing stop manually at the broker. If I set a goal > 14 I go overnight and my position could be forcefully closed by IB. 🙁
When I fully autotrade I miss the extra “index-up” when there is one and that could be a major extra bonus.
Any idea’s?
Many thanks and have a wonderful weekend!
12/13/2019 at 8:37 PM #11484312/16/2019 at 12:01 PM #114969Since you don’t know how the market will behave, how do you want to know in advance the best trailing stop setting in points? Trailing stop is sometimes not a good choice, because it cuts dramatically the profit in the overall results.
In your averaging down scenario, I would say that if you want to include a trailing stop, the MFE type one would be the first idea to start with. But there will always a setting in points that sometimes would act as the best choice and sometimes not ..!
1 user thanked author for this post.
12/16/2019 at 12:42 PM #114971Thank you Nicolas for your reply. Indeed you are right.(as if somebody would have doubted that 🙂 )
I tested the different kind of trailingstops in the snippet library, but there is no good outcome for such short trades.
I stick to the TARGET pPROFIT and a STOP pLOSS. Works best.
After 6 months of testing and auto-paper-trading, I hope to go live in January.
I will keep you posted…
01/07/2020 at 1:57 PM #116126If I want to do the same for short, then I am not able to sellshort another share.
Does anybody know what I do wrong?
It doesn’t add more short and it doesn’t exitshort when time > 215500
123456789101112131415161718DEFPARAM CumulateOrders = falseindicator1 = CALL "Short Dax 1 min 07012020"[73, 15, 30, 84](close)c1 = (indicator1 =< -3)if time>085900 and time<212500 and NOT SHORTONMARKET THENIF c1 THENSELLSHORT 2 SHARES AT MARKETENDIFendifif shortonmarket and countofposition = 2 and close-positionprice > 30 thensellshort 1 shares at marketendifSET target pPROFIT +12if time > 215500 and countofposition > 1 thenexitshort 1 share at marketendif01/07/2020 at 2:18 PM #116131It doesn’t add more short orders because you have set CumulateOrders to false! 😉
COUNTOFPOSITION is negative for short orders, you should code it like this:
1if time > 215500 and countofposition < -1 then1 user thanked author for this post.
01/07/2020 at 2:37 PM #116136Ok. That was not so smart of me… Many thanks Nicolas.
Now I tried:
123456789101112131415161718DEFPARAM CumulateOrders = trueindicator1 = CALL "Short Dax 1 min 07012020"[73, 15, 30, 84](close)c1 = (indicator1 =< -3)if time>085900 and time<212500 and NOT SHORTONMARKET THENIF c1 THENSELLSHORT 2 SHARES AT MARKETENDIFendifif shortonmarket and countofposition = -2 and positionprice - close > 30 thensellshort 1 shares at marketendifSET target pPROFIT +12if time > 215500 and countofposition < -1 thenexitshort 1 share at marketendifbut it still won’t go short 1 more share when the future goes up more than 30 points from entry…
What do I do wrong?
01/07/2020 at 2:39 PM #11613703/04/2020 at 5:12 PM #121164Dear All,
I want to reset my system when the highest value of the last 85 candles/bars – the close[0] > 120 pips
I do this like this:
High[85] – close[0]>120 but that doesn’t seem to work
or
HIGHEST[85](High) – close[0]>120 but that doesn’t seem to work either???
Can anyone help me?
Many thanks!
03/04/2020 at 6:10 PM #121178Your line is correct if you trade DAX or SP500, while it won’t work with FX pairs, add PIPSIZE:
1HIGHEST[85](High) – close[0]>120*pipsizeI think this should do.
1 user thanked author for this post.
03/04/2020 at 7:13 PM #121181 -
AuthorPosts
Find exclusive trading pro-tools on