Leo if the offer to post the EL code for TradeStation still exists I would great appreciate it.
Vwap is an indicator and it needs vwap_h as a function. It should be fine if you import his ELD file. Save this file in your pc and just use File> Import/export easy language and select the file from the saved location.
I will paste the codes below but ELD import should work.
==========================
{ Create VWAP_h function } save indicator as vwap_h
===========================
vars:
PriceW(0),
ShareW(0),
Answer(0);
if date > date[1] then begin
PriceW = 0;
ShareW = 0;
end;
PriceW = PriceW + (AvgPrice * (UpTicks+DownTicks));
ShareW = ShareW + (UpTicks+DownTicks);
if ShareW > 0 then
Answer = PriceW / ShareW;
VWAP_H = Answer;
=====================================================
{ VWAP Indicator }
=====================================================
inputs: VWAPlength ( 10 ), UpColor(Magenta), DownColor(Magenta);
variables: upperMPD ( 0 ), lowerMPD ( 0 ), band ( 0 ),
HH ( 0 ), LL ( 0 ), Answer(0);
Answer = VWAP_H;
if AvgPrice >= Answer then
SetPlotColor(1,DownColor)
else
SetPlotColor(1,UpColor);
Plot1(Answer,"VWAP");
IF High > HighD(0) then
HH = High
else Begin HH = HighD(0);End;
IF Low < LowD(0) then
LL = Low
else Begin LL = LowD(0) ; End;
band = ( HH - LL )/ 2 ;
upperMPD = Answer + band ;
lowerMPD = Answer - band ;
Plot2(upperMPD, "upperMPD" );
Plot3(lowerMPD, "lowerMPD" ) ;
{ Alert criteria }
if Last <= lowerMPD then
Alert( "VWAPlowerMPD" )
else if Last >= upperMPD then
Alert( "VWAPupperMPD" ) ;