Hello muilt time incator on 15 chart
Forums › ProRealTime English forum › ProBuilder support › Hello muilt time incator on 15 chart
- This topic has 3 replies, 2 voices, and was last updated 13 minutes ago by Patrick K Templar.
Viewing 4 posts - 1 through 4 (of 4 total)
-
-
11/26/2024 at 5:18 PM #240788
Trying to show higher time frame indicators of daily then down to an hour then showing it on a 15-minute i’m not having much luck with this could I get some help please thank you very much
dispaly on 15 min123456789101112131415161718192021222324252627282930313233343536// Define the daily timeframe blocktimeframe(daily, updateonclose)DAILYMA10 = average[10](close) // Calculate the 10-period MA on the daily timeframeDAILYMA20 = average[20](close) // Calculate the 20-period MA on the daily timeframe// Calculate daily conditionsDAILYBULL = (close > DAILYMA10 AND close > DAILYMA20) // Bullish trend conditionDAILYBEAR = (close < DAILYMA10 AND close < DAILYMA20) // Bearish trend condition// Determine the daily trendDAILYTREND = 0if DAILYBULL thenDAILYTREND = 1 // Bullish trendelsif DAILYBEAR thenDAILYTREND = -1 // Bearish trendendif// Switch to the default (15-minute) timeframetimeframe(default)MA10 = average[10](close) // Calculate the 10-period MA on the 15-minute timeframeMA20 = average[20](close) // Calculate the 20-period MA on the 15-minute timeframe// Calculate 15-minute conditionsMINUTELONG = (close > MA10 AND close > MA20) // 15-minute long conditionMINUTESHORT = (close < MA10 AND close < MA20) // 15-minute short condition// Final decision combining daily and 15-minute conditionsPOSITION = 0if DAILYTREND = 1 AND MINUTELONG thenPOSITION = 1 // Signal to go longelsif DAILYTREND = -1 AND MINUTESHORT thenPOSITION = -1 // Signal to go shortendif// Return the resultRETURN POSITION AS "TRENbo"11/26/2024 at 6:45 PM #240789AND THIS WAY123456789101112131415161718192021222324252627282930313233343536373839// Define the daily timeframe blocktimeframe (1HOUR)// Conditions to enter long positionsindicator1 = CALL "vid100"(close)B1 = (close > indicator1)indicator2 = CALL "STIPH10"[1, 10]B2 = (close > indicator2)// Conditions to enter short positionsindicator3 = CALL "vid100"(close)S1 = (close < indicator3)indicator4 = CALL "STIPH10"[1, 10]S2 = (close < indicator4)timeframe (daily)// Conditions to enter short positionsindicator3 = CALL "vid100"(close)S3 = (close < indicator5)indicator5 = CALL "STIPH10"[1, 10]S4 = (close < indicator6)// Conditions to enter long positionsindicator6 = CALL "vid100"(close)B3 = (close > indicator7)indicator7 = CALL "STIPH10"[1, 10]B4 = (close > 8)TIMEFRAME(DEFAULT)if B1 and B2 AND B3 AND B4 theni=1.0elsif S1 AND S2 AND S3 AND S4 theni=-1.0elsif close theni=0.0endif// Return the resultRETURN I AS "TRENbo"11/26/2024 at 7:00 PM #240790MT Indicator12345678910111213141516171819202122232425262728293031323334353637383940// Define the daily timeframe blocktimeframe(daily,UpdateOnClose)DAILYMA10 = average[10](close) // Calculate the 10-period MA on the daily timeframeDAILYMA20 = average[20](close) // Calculate the 20-period MA on the daily timeframe// Calculate daily conditionsDAILYBULL = (close > DAILYMA10 AND close > DAILYMA20) // Bullish trend conditionDAILYBEAR = (close < DAILYMA10 AND close < DAILYMA20) // Bearish trend condition// Determine the daily trend//DAILYTREND = 0if DAILYBULL thenDAILYTREND = 1 // Bullish trendelsif DAILYBEAR thenDAILYTREND = -1 // Bearish trendElseDailyTrend=0EndIf// Switch to the default (15-minute) timeframetimeframe(default)MA10 = average[10](close) // Calculate the 10-period MA on the 15-minute timeframeMA20 = average[20](close) // Calculate the 20-period MA on the 15-minute timeframe// Calculate 15-minute conditionsMINUTELONG = (close > MA10 AND close > MA20) // 15-minute long conditionMINUTESHORT = (close < MA10 AND close < MA20) // 15-minute short condition// Final decision combining daily and 15-minute conditions//POSITION = 0if DAILYTREND = 1 AND MINUTELONG thenPOSITION = 1 // Signal to go longelsif DAILYTREND = -1 AND MINUTESHORT thenPOSITION = -1 // Signal to go shortelsePosition=0EndIf// Return the resultRETURN POSITION AS "TRENbo"11/26/2024 at 7:21 PM #2407923RD123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657// Define the daily timeframe block//timeframe (1HOUR)timeframe (daily)// Conditions to enter long positionsindicator1 = CALL "vid100"(close)B1 = (close > indicator1)indicator2 = CALL "STIPH10"[1, 10]B2 = (close > indicator2)// Conditions to enter short positionsindicator3 = CALL "vid100"(close)S1 = (close < indicator3)indicator4 = CALL "STIPH10"[1, 10]S2 = (close < indicator4)//timeframe(default)timeframe (1HOUR)// Conditions to enter short positionsindicator5 = CALL "vid100"(close)S3 = (close < indicator5)indicator6 = CALL "STIPH10"[1, 10]S4 = (close < indicator6)// Conditions to enter long positionsindicator7 = CALL "vid100"(close)B3 = (close > indicator7)indicator7 = CALL "STIPH10"[1, 10]B4 = (close > 8)timeframe(15 minutes,updateonclose)// Conditions to enter short positionsindicator8 = CALL "vid100"(close)S5 = (close < indicator8)indicator9 = CALL "STIPH10"[1, 10]S6 = (close < indicator9)// Conditions to enter long positionsindicator10 = CALL "vid100"(close)B5 = (close > indicator10)indicator11 = CALL "STIPH10"[1, 10]B6 = (close > 11)//timeframe(default)if B1 and B2 AND B3 AND B4 theni=1.0elsif S1 AND S2 AND S3 AND S4 theni=-1.0//elsif close then//i=0.0endif// Return the resultRETURN I AS "TRENbo" -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
Find exclusive trading pro-tools on
Similar topics: