Strategyprofit gives you the profit of the system so far. The rest should be easy.
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 // 10
Nice, along with some of my other scalpers I’m actually running adapted versions of this specific strategy on EUR/USD and USD/JPY as well.
Do you have the version for eurusd and urdjpy with parameter of SL to share?
And could you tell me what other scalper strategy do you run?
Thanks
Hey 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!
I 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
@juanj
ok, 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?
That 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
you got your complete code for me?
If 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.
//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.
not 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
sorry about the circumstances :-/
I 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.
If hour = 1 Then
Trade = 0 //resets the variable every morning
EndIf
If Trade = 0 Then
possize = 1 //the day will always start allowing the first trade
ElsIf Trade >= 2 and positionperf(1) > 0 and positionperf(2) > 0 Then
possize = 0
EndIf
Then just below the Buy command add the trade counter;
If countofposition = 0 and Bull = 1 and NearMA[1] > NearMA[3] and RSI[2](close) > 75 and NearMA > Average[150,2](close) Then
Buy possize contract at market
Trade = Trade + 1
EndIf