Help with a condition
Forums › ProRealTime English forum › ProOrder support › Help with a condition
- This topic has 28 replies, 6 voices, and was last updated 6 years ago by
GraHal.
-
-
08/27/2018 at 11:23 AM #7915608/27/2018 at 11:41 AM #79158
Uuuh really not sure what may happen. Let’s wait for @Nicolas or some expert to see if they can detect the problem.
Regards.
08/27/2018 at 12:28 PM #79160When 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.
1 user thanked author for this post.
08/27/2018 at 12:41 PM #79161@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?
08/27/2018 at 12:52 PM #79163Here’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?
08/28/2018 at 8:56 AM #79219Hi! 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.
123456789ONCE EntryConditions = 0IF c7 thenEntryconditions = EntryCondition + 1endifIF c17 thenEntryConditions = 0 - 1ENDIFLater ..
12345// long entriesif NOT ONMARKET AND (EntryConditions > 0) ...// short entriesif NOT ONMARKET AND (EntryConditions < 0) ...Thanks everybody for cooperation.
08/28/2018 at 9:31 AM #7923009/03/2018 at 1:25 PM #79640Is it possible to implement a money management system in this strategy?
09/03/2018 at 1:27 PM #79641Is it possible to implement a money management system in this strategy?
I mean one which makes the lots bigger with the strategyprofit
09/03/2018 at 3:40 PM #79661Is 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
09/03/2018 at 7:25 PM #79676Hi 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
1DEFPARAM CumulateOrders = Falseto
1DEFPARAM CumulateOrders = TrueLater, insert this before “Conditions”
12345678910111213//dynamic step gridminSTEP = 5 //minimal step of the gridmaxSTEP = 20 //maximal step of the gridATRcurrentPeriod = 5 //recent volatility 'instant' periodATRhistoPeriod = 100 //historical volatility periodATR = 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…
123456789// case BUY - add orders on the same trendif longonmarket and close-tradeprice(1)>=gridstep*pipsize thenBUY amount LOT AT MARKETendif// case SELL - add orders on the same trendif shortonmarket and tradeprice(1)-close>=gridstep*pipsize thenSELLSHORT amount LOT AT MARKETendifI 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.
09/04/2018 at 7:56 AM #79697Hi 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
1DEFPARAM CumulateOrders = Falseto
1DEFPARAM CumulateOrders = TrueLater, insert this before “Conditions”
12345678910111213//dynamic step gridminSTEP = 5 //minimal step of the gridmaxSTEP = 20 //maximal step of the gridATRcurrentPeriod = 5 //recent volatility ‘instant’ periodATRhistoPeriod = 100 //historical volatility periodATR = 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…
123456789// case BUY – add orders on the same trendif longonmarket and close–tradeprice(1)>=gridstep*pipsize thenBUY amount LOT AT MARKETendif// case SELL – add orders on the same trendif shortonmarket and tradeprice(1)–close>=gridstep*pipsize thenSELLSHORT amount LOT AT MARKETendifI 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.
09/04/2018 at 8:46 AM #79703Hi 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.
09/04/2018 at 9:26 AM #79707 -
AuthorPosts