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?
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!
thats true but it doesnt work anyway. i want to look at the daily chart and trade in 10min chart.
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
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.
Fr7Participant
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 ………..
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
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…
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.
ahhhhhh thats why….. okay thanks 🙂