# Custom Indicator Coding Guides and Tutorials

**URL:** <https://community.tradovate.com/t/custom-indicator-coding-guides-and-tutorials/2817>\
**Category:** Custom Indicators\
**Created:** [July 30, 2021, 6:17pm UTC](https://community.tradovate.com/t/custom-indicator-coding-guides-and-tutorials/2817 "2021-07-30T18:17:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![juan](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@juan](https://community.tradovate.com/u/juan)\
**Post date:** [July 30, 2021, 6:17pm UTC](https://community.tradovate.com/t/custom-indicator-coding-guides-and-tutorials/2817/1 "2021-07-30T18:17:10Z")

</div>

Hello,  
I have been trying to learn to code some super simple price action indicators, but I cannot seem to find any information on how to read and get data from bars, help with if statements, how to create loops, paint bars, etc… - All I can do is open up someone else’s code and try to guess from there.

Is there any website with such information that could guide me on coding? I am familiar with Pinescript and there is a vast amount of information there, I am very surprised I cannot find help with Tradovate+Javascript (besides [https://tradovate.github.io/](https://tradovate.github.io/) - where the search function is broken btw)

Here are some of the simple things I would like to figure out:

- How can I get the price (open, close, high, low) of 5 bars ago? d.close(5) or prior.close(5) does not seem to work.
- How can I set different type of variables (integers, booleans, etc…)

Any help will be appreciated.

Thank you,  
Juan.

---

<div class="post-metadata">

**Author:** ![latter-day-trader](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@latter-day-trader](https://community.tradovate.com/u/latter-day-trader)\
**Post date:** [September 2, 2021, 5:59pm UTC](https://community.tradovate.com/t/custom-indicator-coding-guides-and-tutorials/2817/2 "2021-09-02T17:59:26Z")

</div>

Hey @Juan ,

I finally got around to making some videos on this subject. Not quite done with the series yet.

[![](https://us1.discourse-cdn.com/flex015/uploads/tradingforum/original/2X/4/49a9ab1f4dcd42e77eb2fe55c1ee05962f65032b.jpeg "Writing a custom indicator for Tradovate/TSTrader platform: Intro") ](https://www.youtube.com/watch?v=wyL9WsuYXio)

I am not a video editor so bear with me. There are no edits and I got a little long winded at times.
