gravityflyer
New member
Hi all,
Just wondering if anyone has converted Markos Katsanos' new VPN indicator into a ToS script? He just released the indicator in this month's issue of Stocks & Commodities and he has provided the open source script for Amibroker on his website:
Any help for use in ToS would be greatly appreciated!
Just wondering if anyone has converted Markos Katsanos' new VPN indicator into a ToS script? He just released the indicator in this month's issue of Stocks & Commodities and he has provided the open source script for Amibroker on his website:
Code:
// VPN Indicator
// Created by Markos Katsanos
// Copyright 2021
Period = Param(“VP Period”, 30, 5, 100, 10 );
SMOOTH=Param( “SMOOTH”, 3, 1, 10, 1 );
VPNCRIT=Param( “VPNCRIT”, 10, 0, 40, 5 );
MAB=Param( “MA BARS”, 30, 10, 200, 10 );
MAV=MA(V,PERIOD);MAV=IIF(MAV>0,MAV,1);
MF = Avg – Ref( Avg, -1 );MC=.1*ATR(PERIOD);
VMP = IIf( MF > MC, V, 0 ) ;
VP = Sum( VMP , PERIOD);
VMN = IIf( MF < -MC, V, 0 ) ;
VN = Sum( VMN , PERIOD);
VPN=(VP-VN)/MAV/PERIOD*100;
VPN=EMA(VPN,SMOOTH);MAVPN=MA(VPN,MAB);
dynamic_color = IIf( VPN >= VPNCRIT, colorGreen, colorRED ) ;
Plot( VPN, “VPN(” + PERIOD + “)”, DYNAMIC_COLOR , STYLETHICK );
Plot( MAVPN, “MA”,colorGREEN, styleDashed );
Plot(VPNCRIT,”CRIT”,colorBLUE);
Any help for use in ToS would be greatly appreciated!