Variable and figures concatenation

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #118175 quote
    Roger
    Participant
    Veteran

    Hi,

     

    I would like to try optimisation tests based on the time.

    I can define a trading hour to enter long or short but I would like to insert 2 variables in my trading times in order to optimize :

    defparam cumulateorders = false
    
    TradingHour = Time = a'0000'
    TradingHourOut = Time = b'0000'
    
    condenterlong=close<close[1] and TradingHour
    condexitlong=TradingHourOut
    
    
    IF NOT LongOnMarket AND condenterlong THEN
    BUY 1 CONTRACTS AT MARKET
    ENDIF
    
    
    If LongOnMarket AND condexitlong THEN
    SELL AT MARKET
    ENDIF

    As you can see my variables are a and b

    Thanks

    #118178 quote
    nonetheless
    Participant
    Master

    What I would do is:

    TradingHour = a
    TradingHourOut = b
    and then set the range in the optimisation box, for example:
    a      070000 to 100000 in steps of 10000
    b      150000 to 210000 in steps of 10000
    Unless I’ve misunderstood what you want to achieve?
    #118180 quote
    Roger
    Participant
    Veteran

    That is exactly what I want to achieve.

    I have no computer tonight but I will try it tomorrow.

    Thanks for your help!

    #118221 quote
    Roger
    Participant
    Veteran

    Your solution seems to work properly, thanks again, I am going to do some “curve fitting” 🙂

    #118223 quote
    Vonasi
    Moderator
    Master

    I am going to do some “curve fitting” 🙂

    If only I’d known to buy on a Tuesday at 1432 and sell on Wednesday at 1559 then I’d be a rich man.

    At least you are going into this study knowing that there is a huge potential for data mining when using time as a variable. 🙂

    #118226 quote
    Roger
    Participant
    Veteran

    I have spent more than one hour on it and even with overfitting I can barely reach a profit factor of 2 and more than 50% of winning trades… The time window 17h00-18h00 seems to be the most interesting window to work on but for now it is extremely disappointing…

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Variable and figures concatenation


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Roger @rgkp Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by Roger
6 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/28/2020
Status: Active
Attachments: No files
Logo Logo
Loading...