Help with a condition

Viewing 14 posts - 16 through 29 (of 29 total)
  • Author
    Posts
  • #79156 quote
    turame
    Participant
    Master

    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 ?

    #79158 quote
    tradingthelife
    Participant
    Senior

    Uuuh really not sure what may happen. Let’s wait for @Nicolas or some expert to see if they can detect the problem.

    Regards.

    #79160 quote
    Nicolas
    Keymaster
    Master

    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.

    GraHal thanked this post
    #79161 quote
    GraHal
    Participant
    Master

    @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?

    #79163 quote
    GraHal
    Participant
    Master

    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/

    #79219 quote
    tradingthelife
    Participant
    Senior

    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.

    #79230 quote
    GraHal
    Participant
    Master

    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! 🙂

    #79640 quote
    raphaelopilski
    Participant
    Senior

    Is it possible to implement a money management system in this strategy?

    #79641 quote
    raphaelopilski
    Participant
    Senior

    Is it possible to implement a money management system in this strategy?

    I mean one which makes the lots bigger with the strategyprofit

    #79661 quote
    Vonasi
    Moderator
    Master

    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

    #79676 quote
    tradingthelife
    Participant
    Senior

    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.

    #79697 quote
    raphaelopilski
    Participant
    Senior

     

    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

    to

    Later, insert this before “Conditions”

    Also, after fist trade, insert this…

    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.

    #79703 quote
    tradingthelife
    Participant
    Senior

    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.

    #79707 quote
    GraHal
    Participant
    Master

    So might you share an .itf file of the latest version / best version please?

Viewing 14 posts - 16 through 29 (of 29 total)
  • You must be logged in to reply to this topic.

Help with a condition


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
tradingthelife @komiya Participant
Summary

This topic contains 28 replies,
has 6 voices, and was last updated by GraHal
7 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/26/2018
Status: Active
Attachments: 6 files
Logo Logo
Loading...