NexusFi: Find Your Edge


Home Menu

 





EasyLanguage VWAP code help


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one MilesT with 4 posts (4 thanks)
    2. looks_two olobay with 3 posts (0 thanks)
    3. looks_3 treydog999 with 2 posts (3 thanks)
    4. looks_4 ABCTG with 1 posts (0 thanks)
    1. trending_up 16,825 views
    2. thumb_up 10 thanks given
    3. group 7 followers
    1. forum 12 posts
    2. attach_file 1 attachments




 
Search this Thread

EasyLanguage VWAP code help

  #11 (permalink)
csayantan
kolkata+WB/Country
 
Posts: 22 since Dec 2013
Thanks Given: 10
Thanks Received: 4

Hi

i got floating point invalid operation.
can you re-fix it?

Thx
CS

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Trade idea based off three indicators.
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
  #12 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

CS,

this usually happens when the code tries to divide by 0. You can fix this by adding checks to each division making sure the divisor is not zero. For example there are several division done by Totalvolume.
Adding
 
Code
if Totalvolume <> 0 then ...
will fix that in this case.

Regards,
ABCTG


csayantan View Post
Hi

i got floating point invalid operation.
can you re-fix it?

Thx
CS


Follow me on Twitter Reply With Quote
  #13 (permalink)
 
tturner86's Avatar
 tturner86 
Portland, Oregon
 
Experience: Intermediate
Platform: F-16CM-40
Trading: GBU-39
Posts: 6,191 since Sep 2013
Thanks Given: 10,459
Thanks Received: 12,695


Just found this easy code and was able to make it work in OEC.

Inputs:Time_Start(0000);
vars:
PriceW(0),
ShareW(0),
bb(0),
vwap(0);

if date > date[1] then begin
PriceW = 0;
ShareW = 0;
end;

value1= (open+high+low+close)/4;

bb=volume;

if time > time_start then begin
PriceW = pricew + value1*bb;
ShareW = ShareW + bb;
vwap = PriceW / ShareW;
end;

Plot1(vwap);

Visit my NexusFi Trade Journal Reply With Quote




Last Updated on April 18, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts