NexusFi: Find Your Edge


Home Menu

 





programming question


Discussion in TradeStation

Updated
      Top Posters
    1. looks_one SideShowBob233 with 1 posts (0 thanks)
    2. looks_two coinpit with 1 posts (0 thanks)
    3. looks_3 tulanch with 1 posts (1 thanks)
    4. looks_4 ABCTG with 1 posts (1 thanks)
    1. trending_up 2,569 views
    2. thumb_up 2 thanks given
    3. group 5 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
Brian Hazel
Santa Rosa Laguna, Philippines
 
Posts: 2 since Feb 2016
Thanks Given: 1
Thanks Received: 0

Do anyone know a good site with example of easy language programming for beginners? I keep getting division by zero error.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NinjaTrader Parent Payward Acquires Bitnomial for $550M …
Platforms and Indicators
Election Sunday Resolves: Peru Heads to Runoff at 42pct, …
Prediction Markets & Event Contracts
El Clasico Draws $9.2M in Prediction Market Action -- Bi …
Prediction Markets & Event Contracts
April FOMC Minutes: Most Divided Fed Since 1992 -- Many …
Traders Hideout
March Jobs Report Update: 178K Beat vs 59K Expected, Wag …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks
  #2 (permalink)
 tulanch 
Salt Lake City, UT
 
Experience: Intermediate
Platform: SC, NT, MT
Broker: AMP
Trading: NQ ES YM Bonds
Posts: 285 since Mar 2010
Thanks Given: 51
Thanks Received: 404

not to sound mean - but when ever I have a programming question I google it

for example with your question I would google "easy language programming for beginners"

tons of hits...

I use this approach for any and all programming questions of any level or skill set

where I work our software and network engineers routinely use this approach when resolving weird issues, specifically ones we have never encountered before


Reply With Quote
Thanked by:
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,642


Brian Hazel,

Tradestation provides lots of information on their website - like the EasyLanguage Essentials PDF for example.

To fix your error, simply make sure that the divisor is not zero, before the division.

 
Code
if divisor <> 0 then
   quotient =  divident / divisor 
else
quotient = 0 ;
Regards,

ABCTG


Brian Hazel View Post
Do anyone know a good site with example of easy language programming for beginners? I keep getting division by zero error.


Follow me on X Reply With Quote
Thanked by:
  #4 (permalink)
coinpit
San Francisco, CA
 
Posts: 1 since Dec 2015
Thanks Given: 0
Thanks Received: 0


Brian Hazel View Post
Do anyone know a good site with example of easy language programming for beginners? I keep getting division by zero error.

stackexchange.com has many resources regarding programming.

Depending on the programming language popularity, asking a question there should help.

Also, if you want to learn programming from scratch there are a bunch of resources on the web, just google javascript tutorial


Reply With Quote
  #5 (permalink)
SideShowBob233
West Orange, NJ
 
Posts: 1 since Jul 2012
Thanks Given: 0
Thanks Received: 0

I find I get divide by zero errors often when working with continuous futures. As the prices get backadjusted you sometimes end up with a Close of zero which messes up calculations for percentage gains/losses.

There's not a real good way around it -- what I usually do is just add a try/catch around it now that Easylanguage supports that which prevents the error from surfacing. Or you can do what the previous post said and check for zero each time you divide, but then you need to figure out what to do (and make sure what you do won't affect a moving average for example).

SSB


Reply With Quote




Last Updated on February 25, 2016


© 2026 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 - Downloads - Top
no new posts