Hi there !
That’s the same for me… only one trade with the new version .itf on Dax 1 min… I can’t understand, I’m still on it !
Everybody has a solution ?
Uuuh really not sure what may happen. Let’s wait for @Nicolas or some expert to see if they can detect the problem.
Regards.
When a strategy stop trading, it is most of the time due to an error that cause the code to crash, like a division by zero. You can also change the preloadbars setting to see what happen if it is set to 0.
@komiya go back to the previous version that did execute trades and then work forward re changes but run it on 10k bars each time you make even a single change so you can isolate which change stopped it trading?
Boring I know and not as exciting as trying out new body parts on Frankie!! 🙂
Let us know how you get on please?
Here’s another idea … compare version with trades and version with no trades on the website below … it’s real easy 2 x copy and paste and click on Compare! Let us know what you find?
https://www.diffchecker.com/
Hi! I’m not having problems to check strategy…I don’t know which are the reasons.
Finally I’ve solved my problem. It was easier than I thought but I didn’t find the solution until yesterday. I’m not sure if it’s the best solution but it seems it’s working.
ONCE EntryConditions = 0
IF c7 then
Entryconditions = EntryCondition + 1
endif
IF c17 then
EntryConditions = 0 - 1
ENDIF
Later ..
// long entries
if NOT ONMARKET AND (EntryConditions > 0) ...
// short entries
if NOT ONMARKET AND (EntryConditions < 0) ...
Thanks everybody for cooperation.
Ah good @komiya, so glad you sorted it!
Please can you post the latest working code now, I’d kinda like to close the loop and see trades on my Platform with your code! 🙂
Is it possible to implement a money management system in this strategy?
Is it possible to implement a money management system in this strategy?
I mean one which makes the lots bigger with the strategyprofit
Is it possible to implement a money management system in this strategy?
Various money management options can be found in the Snippet Library.
https://docs.google.com/spreadsheets/d/1rgboqj7sVwsP9ZRhOduOefye48QMWC07jWVXCl-KJPU/edit#gid=0
Hi raphaelopilski, could you make strategy work? I didn’t have problems, but some people did. If you have any comment about strategy to enhance it, it would be great 😉
You can try this (is a piece of code I found in a strategy):
First of all you should change
DEFPARAM CumulateOrders = False
to
DEFPARAM CumulateOrders = True
Later, insert this before “Conditions”
//dynamic step grid
minSTEP = 5 //minimal step of the grid
maxSTEP = 20 //maximal step of the grid
ATRcurrentPeriod = 5 //recent volatility 'instant' period
ATRhistoPeriod = 100 //historical volatility period
ATR = averagetruerange[ATRcurrentPeriod]
histoATR= highest[ATRhistoPeriod](ATR)
resultMAX = MAX(minSTEP*pipsize,histoATR - ATR)
resultMIN = MIN(resultMAX,maxSTEP*pipsize)
gridstep = (resultMIN)
Also, after fist trade, insert this…
// case BUY - add orders on the same trend
if longonmarket and close-tradeprice(1)>=gridstep*pipsize then
BUY amount LOT AT MARKET
endif
// case SELL - add orders on the same trend
if shortonmarket and tradeprice(1)-close>=gridstep*pipsize then
SELLSHORT amount LOT AT MARKET
endif
I didn’t try but it shoul work. You have to tune vars at first for specific market. Basically it’s a grid steps system and it adds orders based in those steps.
I hope this helps.
Hi raphaelopilski, could you make strategy work? I didn’t have problems, but some people did. If you have any comment about strategy to enhance it, it would be great 
You can try this (is a piece of code I found in a strategy):
First of all you should change
|
|
DEFPARAM CumulateOrders = False
|
to
|
|
DEFPARAM CumulateOrders = True
|
Later, insert this before “Conditions”
1
2
3
4
5
6
7
8
9
10
11
12
13
|
//dynamic step grid
minSTEP = 5 //minimal step of the grid
maxSTEP = 20 //maximal step of the grid
ATRcurrentPeriod = 5 //recent volatility ‘instant’ period
ATRhistoPeriod = 100 //historical volatility period
ATR = averagetruerange[ATRcurrentPeriod]
histoATR= highest[ATRhistoPeriod](ATR)
resultMAX = MAX(minSTEP*pipsize,histoATR – ATR)
resultMIN = MIN(resultMAX,maxSTEP*pipsize)
gridstep = (resultMIN)
|
Also, after fist trade, insert this…
|
|
// case BUY – add orders on the same trend
if longonmarket and close–tradeprice(1)>=gridstep*pipsize then
BUY amount LOT AT MARKET
endif
// case SELL – add orders on the same trend
if shortonmarket and tradeprice(1)–close>=gridstep*pipsize then
SELLSHORT amount LOT AT MARKET
endif
|
I didn’t try but it shoul work. You have to tune vars at first for specific market. Basically it’s a grid steps system and it adds orders based in those steps.
I hope this helps.
I wanna let the system run some weeks. Because it´s only good in 10.000 units. In 100.000 it is really bad, so there is no possibility to backtest the strategy. So let´s look in october how the performance is. If it´s good, I will try to implement it.
Hi Raphael,
It should work well in 30000 bars too. Idea is optimizing vars weekly. So it always will be adapted to market conditions.
Thanks for your comments.
So might you share an .itf file of the latest version / best version please?