El indicdor Twiggs Money Flow fué creado por Collin Twiggs y es una variación del Chaikin Money flow Index.
Que yo sepa , no existe todavía una versión para la plataforma Prorealtime . Es por eso el motivo de esta adaptación de un código de la plataforma Tradingview : https://www.tradingview.com/script/Jccjg8CR-Indicators-Twiggs-Money-Flow-TMF-Wilder-s-MA-WiMA/
En esta versión , el tipo de media es configurable , donde podemos elegir entre simple, exponencial, de Wilder…
Agradecería que alguién me confirmara o verificase que la traducción del código para PRT es correcta.
REM TWIGGS MONEY FLOW
//adaptación del código de LazyBear en tradingview para PRT
// parámetro t = tipo de media en cuadro de variables
lenght=21
hline=0
trh=MAX(close[1],high)
trl=MIN(close[1],low)
trc=trh-trl
if trc=0.9999999 then
trc=trc
endif
adv=VOLUME*((close-trl)-(trh-close))/trc
wv=VOLUME+(VOLUME[1]*0)
wmV=Average[lenght,t](wv)
wmA=Average[lenght,t](adv)
if wmV=0 then
wmV=0
else
tmf=wmA/wmV
endif
RETURN tmf as "twiggs money flow",hline as "0",0.20 as "0.20",-0.20 as "-0.20"
Gracias por publicar aquí, me parece comparación exacta con la versión Pinescript, bien hecho 🙂
Otro código agradable para enviar a la biblioteca? Dejé que haga el trabajo 🙂
Al estar publicada la respuesta en italiano, he entendido que usted mismo publicará el indicador en la biblioteca.
O.K. GRACIAS, Nicolas.
Lo siento por malentendido, y por el idioma italiano .. 🙂
¡Estaba diciendo que me gustaría que hicieras el trabajo de poner el código en la biblioteca! ahahahahah
Malentendido solucionado. Hecho Nicolas.
Dear all,
I really love this indicator, thank you very much for developing it! 🙂
When I build an automatic trading strategy, ProRealTime computes based on any conditions I determine based on this indicator.
However, when I try to build a ProScreener based on this Twiggs Money Flow (e.g. higher value than period before), ProRealTime does not compute and consequently does not come up with any stock, no matter which stock list I use.
Do you have an idea why this is the case?
And, even more importantly, how to solve the issue and use this awesome indicator also in ProScreener?
Thank you very much for any support!!
Hi SAcht
If you put your screener code on here then we likely can help … it makes it so much easier if we can see the code we are trying to fix 🙂
Regards
GraHal
Hi GraHal,
Of course, I just thought that perhaps someone else already had the same issue 😉
I kept it very simple for now to limit potential sources of error:
indicator1, ignored, ignored, ignored = CALL “Twiggs Money Flow”[3]
c1 = (indicator1 CROSSES OVER 0)
SCREENER[c1] (Variation AS “% Last Price Action”)
In this case, I used the build-in PRT assistance in order to define the condition.
The idea is to screen all stocks for those whose Twiggs Money Flow just crosses the mid level (0).
However, no matter which list of stocks I choose, the screener never comes up with any results.
It almost seems as if PRT does not screen for the condition. When I implement the same function in ProBacktest, it seems to work, though.
Any ideas very welcome!
>>Moderator mensaje: Por favor, se habla Español en el foro español, y Ingles en el foro inglese, muchas gracias<<
>>Moderator message: please let’s keep the forums tidy by speaking Spanish only on the Spanish forum and English in the English forum for future usage. Thank you. <<
Just in case, please keep in mind the cross over function would return only a result for the actual candle where the cross over happened, not for all candles after having crossed over… don’t know if that helps but it could explain rare or zero screening results, this confusion has happened before with other members, so my apologies if you knew that already but I had to mention it just in case…
Por favor tenga en cuenta que la función cross over devolverá sólo un resultado para la vela que está pasando la cruz, no para todas las velas después de haber cruzado … no sé si eso ayuda pero esta confusión ha ocurrido antes con otros miembros, mis disculpas si ya lo sabías, pero tuve que mencionarlo
@Noobywan disculpas, uso Chrome traducir y luego debo tener tan absorto me olvido de que no es el foro Inglés.
@SAcht tu indicador de Twiggs tiene [3] en el extremo? Solo una idea?
Funciona Screener si se quita (Variación AS “% Last Price Action”)
Lo siento, mi español es un poco limitado.
Yo sé que la función cross over devolverá sólo un resultado para la vela que está pasando la cruz, pero normalmente siempre hay unas acciónes con este señal, porque Twiggs Money Flow oscila entre +0.20 y -0.20.
[3] relaciona al tipo de media en cuadro de variables (de Wilder), véase el artículo de bolsatrilera, por favor.
Eliminar (Variación AS “% Last Price Action”) solamente elimina la descripción del título en el la lista de acciónes…
Sin embargo, muchas grácias para tu ayuda! 🙂
Tengo una idea: ¿es posible que no sue puede usar indicatores con IF THEN función en ProScreener?
Aha de nuevo a … si pone su código completo aquí, entonces podemos ver y probar en nuestras propias plataformas? 🙂
Esto es el código completo:
indicator1, ignored, ignored, ignored = CALL “Twiggs Money Flow”[3]
c1 = (indicator1 CROSSES OVER 0)
SCREENER[c1] (Variation AS “% Last Price Action”)
El indicador Twiggs Money Flow (mencionado por bolsatrilera) contiene una función IF THEN.
Si copia mi código y el indicador, podéis ver y probar en PRT 🙂
Ah gotcha ... Voy a probarlo en mi Plataforma durante el fin de semana :)