yccheok / jstock

JStock is a free stock market software for 28 countries.
https://jstock.org
664 stars 348 forks source link

How to assign variables in jstock desktop scanner editor #70

Open ghost opened 8 years ago

ghost commented 8 years ago

I want to assign a variable in jstock how can I do it

this example variable

x=(open-high)/2*high

I want to assign a x variable because I am using it in multiple parts of the same alert code.

@yccheok I mentioned this in my earlier(may be 6-8 months) post; are you planning to add a simple programmable script editor instead of current block editor. The current block editor has less freedom, more constraint and its difficult to write some alerts because lack of the math function such as cumulative function.

If you are not planning to add a script editor then can you please enable a inline java editor (with out using an IDE) in the scanner such a way that we can add/upload our own java code for creating alert

yccheok commented 8 years ago

Sorry for that. I'm really busy these day and have to stop development on JStock for a while. However, your request are absolutely valid, especially for advance users who has little background on programming.

I need to think for a while on how to add this feature. I'm not sure is it better to have a inline java editor in current existing indicator editor, or a full fledge script editor as a new tab.

Most probably I will implement it, to support Java Script language - https://docs.oracle.com/javase/8/docs/technotes/guides/scripting/prog_guide/about.html

beside x=(open-high)/2*high, do you have more use case?

ghost commented 8 years ago

I know you are doing this as a free time project and as a jstock user (especially linux distros) I am really thankful to you for creating this project and making it free. I mostly use jstock for its inbuilt scanner; its one of the best feature which I cant even find in some premier softwares. I would definitely want jstock scanner to be a little bit more stronger such as creating functions, looping, math calculations etc. With current block method I am only able to create simple strategies for scanning and these strategies in most cases doesn't work in the market.

I know you have many other user requests and I am very grateful that you listened to me. Take your good time and no rush here :)

kbh4r4th commented 8 years ago

@yccheok - Yes, its a feature that I would love to see. Preferably in Java (I'm a Java developer ;-)).

I have few use cases

  1. We could arrive at a logic to find support/resistance levels for Stocks programatically
  2. To scan stocks gained/lost N number of days
  3. To scan a stock that is flat

@potholiday - Are you from India?