Call MTF indicator
Forums › ProRealTime English forum › ProOrder support › Call MTF indicator
- This topic has 10 replies, 2 voices, and was last updated 3 years ago by
Franro.
-
-
05/04/2022 at 1:10 PM #192650
Example of strategy below
timeframe (4 hour)
indicator1 = ADX[15]
indicator2 = ADXR[20]
entrycond1 = (indicator1[1] > indicator2[1])timeframe ( default)
indicator3 = ADX[10]
indicator4 = ADXR[14]
entrycond2 = (indicator3[1] > indicator4[2])If entrycond1 and entrycond2 then
buy 1 contract at market
If I would split it into indicator and strategy without the MTF I know that it would just be done like below:
indicator:indicator1 = ADX[15]
indicator2 = ADXR[20]
entrycond1 = (indicator1[1] > indicator2[1])indicator3 = ADX[10]
indicator4 = ADXR[14]
entrycond2 = (indicator1[3] > indicator2[4])return entrycond1, entrycond2
strategy:
entrycond1, entrycond2 = CALL “indicator”
if entrycond1 and entrycond2 then
buy 1 contract at market.
Above is just wihtout MTF but why is it not with MTF same with indicator and on strategy file
Timeframe (4 hour)entrycond1 = call “indicator”
timeframe (default)
entrycond2 = call “indicator”
if entrycond1 and entrycond2 then
buy 1 contract at market.
Why is it not working like above, and what am I doing wrong?
05/04/2022 at 4:22 PM #192683Can you post a screenshot with the mouse sitting on a bar whose dataare visible?
Do you always use a 4h TF for both the split indicator+strategy?
05/04/2022 at 5:27 PM #19269105/04/2022 at 5:34 PM #192692indicator123456789indicator1 = random1indicator2 = random2entrycond1 = (random1 > random2])indicator3 = random3indicator4 = random4entrycond2 = (random3 > random4)return entrycond1, entrycond2123456789timeframe (4 hours)entrycond1 = CALL "indicator"timeframe (default)entrycond2 = CALL "indicator"if entrycond1 and entrycond2 thenbuy 1 contract at marketendifWhy does it not work like this? How should I be doing it to make it work? I do not use this code above I am just talking in general. What am I doing wrong with the CALL on MTF.
Because when I do call like this (wiht my other strategies) I get this message “the function “indicator” called from “strategy” returns 21 values but your codes needs 2. I can not understand what I am doing wrong..
05/04/2022 at 6:05 PM #19269505/04/2022 at 10:01 PM #192705The indicator returns 2 values, so you need to use 2 variables when using CALL.
1 user thanked author for this post.
05/05/2022 at 10:42 AM #19273205/05/2022 at 11:15 AM #192743The indicator RETURNs 3 data so you need to use 3 variables when CALLing it.
05/05/2022 at 11:21 AM #192744Ofcourse I did wrong in the example. But even with 3 data and 3 varialbes on calling it, it somehows give different result. It works to backtest but the result differ when its 3 different timesframes (it does not work correctly)
05/05/2022 at 11:28 AM #192745Post the complete code and details about issues, date and time of candles with wrong data, instrument and default TF used, so I can get the same results.
1 user thanked author for this post.
05/05/2022 at 5:54 PM #192785 -
AuthorPosts
Find exclusive trading pro-tools on