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 Lampert with 1 posts (3 thanks)
    1. trending_up 16,800 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?
Exit Strategy
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #12 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,434 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

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