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 1,937 views
    2. thumb_up 2 thanks given
    3. group 5 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

programming question

  #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?
Quantum physics & Trading dynamics
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
Cheap historycal L1 data for stocks
Stocks and ETFs
 
  #2 (permalink)
 tulanch 
Salt Lake City, UT
 
Experience: Intermediate
Platform: SC, NT, MT
Broker: AMP
Trading: NQ ES YM Bonds
Posts: 265 since Mar 2010
Thanks Given: 50
Thanks Received: 387

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,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


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 Twitter 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


© 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