multi timeframe doesn't work

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #75955 quote
    immo_vienna
    Participant
    Average
    defparam cumulateorders = false
    defparam preloadbars = 500
    
    // Verhindert das Trading an bestimmten Wochentagen
    daysForbiddenEntry = OpenDayOfWeek = 5 OR OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    //Money Management
    capital = 25000
    risk = 0.1
    stoploss = 10 // Could be our variable X
    // and calculate contracts
    equity = capital + StrategyProfit
    maxrisk = round(equity*Risk)
    positionsize = abs(round((maxrisk/stoploss)/PointValue)*pipsize)
    
    // Bedingungen zum Einstieg in Long-Positionen
    timeframe(10 minutes,updateonclose)
    c1 = (high < high[1])
    c2 = (low < low[1])
    c3 = (close < medianprice[1]) // BULLSHIT
    c4 = close[10] < average[10](close)
    c5 = (low < average[10](close)+std[10](close)) // - = mehr Sicherheit
    c6 = (close > average[10](close))
    c = c1 and c2 and c3 and c4 and c5 and c6
    
    if c and not daysForbiddenEntry then
    buy positionsize contract at market
    endif
    
    // Bedingungen zum Ausstieg von Long-Positionen
    cc1 = (close > average[10](close)+std[20](close)) // hier ggf. auch - und close[1]
    cc2 = (close > close[1])
    cc = cc1 and cc2
    
    if cc then
    sell at market
    endif
    

    timeframe doesn’t work?

    #75960 quote
    robertogozzi
    Moderator
    Master

    I did not read your code thoroughly, but MTF in your code is not necessary, since you use only the 10-minute TF!

    Lines 1-16 are within the default TF, but they do not do much TF-related activity, then you switch to 10 minutes through the end.

    If you do not use the TIMEFRAME keyword and launch it on a 10-minute TF you’ll get the same results, I guess!

    #75966 quote
    immo_vienna
    Participant
    Average

    thats true but it doesnt work anyway. i want to look at the daily chart and trade in 10min chart.

    14-07-_2018_12-03-23.png 14-07-_2018_12-03-23.png
    #75968 quote
    immo_vienna
    Participant
    Average

    a better screenshot now

     

    // Festlegen der Code-Parameter
    defparam cumulateorders = false
    defparam preloadbars = 500
    
    // Verhindert das Trading an bestimmten Wochentagen
    daysForbiddenEntry = OpenDayOfWeek = 5 OR OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    //Money Management
    capital = 25000
    risk = 0.1
    stoploss = 10 // Could be our variable X
    // and calculate contracts
    equity = capital + StrategyProfit
    maxrisk = round(equity*Risk)
    positionsize = abs(round((maxrisk/stoploss)/PointValue)*pipsize)
    
    // Bedingungen zum Einstieg in Long-Positionen
    timeframe (default)
    c1 = (high < high[1])
    c2 = (low < low[1])
    c3 = (close < medianprice[1]) // BULLSHIT
    c4 = close[10] < average[10](close)
    c5 = (low < average[10](close)+std[10](close)) // - = mehr Sicherheit
    c6 = (close > average[10](close))
    c = c1 and c2 and c3 and c4 and c5 and c6
    
    timeframe (5 minutes)
    if c and not daysForbiddenEntry then
    buy positionsize contract at market
    endif
    #75969 quote
    immo_vienna
    Participant
    Average

    line 19 – doesnt work

    line 28 does

    14-07-_2018_12-03-23-1.png 14-07-_2018_12-03-23-1.png
    #75972 quote
    robertogozzi
    Moderator
    Master

    There must be an error somewhere BEFORE line 19.

    I can only suggest that you take a look at this https://www.prorealcode.com/topic/premiere-approche-sur-le-multi-timeframe-avec-prorealtime/, where you may have a chance to spot the correct syntax.

    #75973 quote
    Fr7
    Participant
    Master

    You probably have not yet enabled the multiframe option in prorealtime. Nicolas said that the multiframe option would be enabled as of next Wednesday in demo accounts ………..

    #75974 quote
    Vonasi
    Moderator
    Master

    Should it not be this and then launched on a 5 minute chart?

    // Festlegen der Code-Parameter
    defparam cumulateorders = false
    defparam preloadbars = 500
     
    // Verhindert das Trading an bestimmten Wochentagen
    daysForbiddenEntry = OpenDayOfWeek = 5 OR OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
     
    //Money Management
    capital = 25000
    risk = 0.1
    stoploss = 10 // Could be our variable X
    // and calculate contracts
    equity = capital + StrategyProfit
    maxrisk = round(equity*Risk)
    positionsize = abs(round((maxrisk/stoploss)/PointValue)*pipsize)
     
    // Bedingungen zum Einstieg in Long-Positionen
    timeframe (daily)
    c1 = (high < high[1])
    c2 = (low < low[1])
    c3 = (close < medianprice[1]) // BULLSHIT
    c4 = close[10] < average[10](close)
    c5 = (low < average[10](close)+std[10](close)) // - = mehr Sicherheit
    c6 = (close > average[10](close))
    c = c1 and c2 and c3 and c4 and c5 and c6
     
    timeframe (default)
    if c and not daysForbiddenEntry then
    buy positionsize contract at market
    endif
    #75977 quote
    immo_vienna
    Participant
    Average

    thats what i wanted to try 😀

    i used both – demo and my account. doesn’t work and i don’t know why. i checked the link u gave me – thats where i got it from…

    #75979 quote
    Vonasi
    Moderator
    Master

    MTF is currently only available on PRT papertrading account platforms. PRT via IG accounts and PRT sponsored IG accounts should be getting access to MTF on their demo accounts next Wednesday.

    #75980 quote
    immo_vienna
    Participant
    Average

    ahhhhhh thats why….. okay thanks 🙂

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

multi timeframe doesn't work


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 10 replies,
has 4 voices, and was last updated by immo_vienna
7 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/14/2018
Status: Active
Attachments: 2 files
Logo Logo
Loading...