Squeeze MTF
Forums › ProRealTime forum Français › Support ProBuilder › Squeeze MTF
- This topic has 3 replies, 3 voices, and was last updated 4 years ago by
Soyouzzz1.
-
-
02/11/2021 at 1:01 PM #161063
Bonjour, je voudrais créer un indicateur de compression haussière qui serait actif aussi longtemps que le MACD 5/8/5 en 1 minute est vert.
Mon problème est que lorsque j’applique l’indicateur sur un graphique de 1 minute, le délai multi ne fonctionne pas parce que l’indicateur montre 1 minute de compressions et non pas 5 minutes de compressions.
Quelqu’un peut-il m’aider?
Voici le code:
123456789101112131415161718192021222324252627282930313233bbb = BollingerDown[20](close)bbh = BollingerUp[20](close)histo = MACD[5,8,5](close)// ********************************* BUY ***********************timeframe(5minutes)// bbh>bbh-1c1 = bbh>bbh[1]// bbb<bbb-1c2 = bbb<bbb[1]// high>bbh ou low<bbbc3 = high>bbh or low<bbbtimeframe(1minute)// MACD 1 minute vertc4 = histo>0squeeze = c1 and c2 and c3 and c4if squeeze thenbackgroundcolor (0, 204, 203)endifreturn02/11/2021 at 1:47 PM #161070Dans le code ci-dessus, les indicateurs ne sont pas déclarés dans le timeframe 5-minutes, car leurs codes ne se situent pas en dessous de l’instruction TIMEFRAME(5 minutes), mais utilise le timeframe affiché.
1 user thanked author for this post.
02/11/2021 at 2:15 PM #16107802/11/2021 at 3:31 PM #161098Thank you for your help.
Here is the right code if someone is interested:
(precision: I use this indicator to scalp micro-tracements to get some ticks)1234567891011121314151617181920212223242526272829303132timeframe(5minutes)bbd = BollingerDown[20](close)bbu = BollingerUp[20](close)// bbu>bbu-1c1 = bbu>bbu[1]// bbd<bbd-1c2 = bbd<bbd[1]// high>bbu ou low<bbdc3 = high>bbu or low<bbdtimeframe(1minute)histo = MACD[5,8,5](close)// MACD 1min greenc4 = histo>0squeeze = c1 and c2 and c3 and c4if squeeze thenbackgroundcolor (0, 204, 203)endifreturn -
AuthorPosts