1 Min Trading Strategy
Forums › ProRealTime English forum › ProOrder support › 1 Min Trading Strategy
- This topic has 219 replies, 29 voices, and was last updated 7 years ago by Leo.
-
-
09/16/2017 at 9:51 AM #4633809/21/2017 at 3:41 PM #46834
For information, here result of two weeks in live on the dax
// Code principal : m1 dax
//————————————————————————-
//Stategy: Scalping Candles
//Market: DAX
//Timeframe: 1min
//Author: Juan Jacobs (Jd3gjacobs@gmail.com)SL = 50 // 50
TP = 55 // 55
TS = 10 // 101 user thanked author for this post.
09/21/2017 at 3:45 PM #4683609/21/2017 at 3:47 PM #4683809/21/2017 at 3:55 PM #4684109/26/2017 at 8:19 AM #47334Hey guys, strategy works quite good. But I would like to give it a function:
If the first two trades of a day are higher than 0 (or lets better say if they are won), than no trade at this day anymore.
Why? Because we are only in long direction, and often the third or fourth trade is getting lost, because the dax is correcting. This is in my realtest. So can anybody help me? I tried to do myself but it didn´t work.
Thanks a lot!
09/26/2017 at 8:29 AM #47338I noticed it myself, added a variable called AllowTrade that resets every morning at say 01h00 to = 0
Then I placed the Buy command in an If statement saying;
If AllowTrade <= 2 Then
Buy possize contract at market
If positionperf(1) > 0 Then
AllowTrade = AllowTrade + 1
EndIF
EndIF
09/26/2017 at 8:38 AM #47339ok, looks good. but here you only give him 2 trades per day. I want him to stop after 2 won trades. you know what I mean?
09/26/2017 at 8:51 AM #47342That is why the condition states positionperf(1) > 0 (only increment the AllowTrade counter for a won condition).
If you only want to stop trading after two consecutive wins then change the condition to;
If AllowTrade <= 2 Then
Buy possize contract at market
If positionperf(1) > 0 and positionperf(2) > 0 Then
AllowTrade = 3
EndIF
EndIF
09/26/2017 at 8:59 AM #47344you got your complete code for me?
09/26/2017 at 9:47 AM #47360If positionperf(1) > 0 and positionperf(2) > 0 is not working, because the system is stopping the complete strategy after winning two trades in a row… maybe I´m on the wrong way. But I don´t know how to reset the counting of winning positions each day.
09/26/2017 at 9:52 AM #47363//Just add at the top of your code;
If hour = 1 Then
AllowTrade = 0
EndIf
//This will reset the AllowTrade variable every morning
Then add the If statement I already provided above to increment the AllowTrade variable upon a winning trade.
09/26/2017 at 9:57 AM #47367not working… sorry. I think it´s because of positionperf(1) > 0 and positionperf(2) > 0
the system only counts the first two won positions in a row and stops the strategy
09/26/2017 at 9:58 AM #47369sorry about the circumstances :-/
09/26/2017 at 10:07 AM #47377I don’t have access to PRT right now have been trying to code it without looking at the exact way I did it, but I think I remember now;
This code should fix the issue.
123456789101112131415If hour = 1 ThenTrade = 0 //resets the variable every morningEndIfIf Trade = 0 Thenpossize = 1 //the day will always start allowing the first tradeElsIf Trade >= 2 and positionperf(1) > 0 and positionperf(2) > 0 Thenpossize = 0EndIfThen just below the Buy command add the trade counter;
1234If countofposition = 0 and Bull = 1 and NearMA[1] > NearMA[3] and RSI[2](close) > 75 and NearMA > Average[150,2](close) ThenBuy possize contract at marketTrade = Trade + 1EndIf -
AuthorPosts
Find exclusive trading pro-tools on