Showing posts with label stock market. Show all posts
Showing posts with label stock market. Show all posts

September 07, 2022

nested exception is org.springframework.core.io.buffer.DataBufferLimitException | Exceeded limit on max bytes to buffer : 262144 | org.springframework.web.reactive.function.client.WebClientResponseException

Hi, While trying to implement a NSE Ticker for stockmarket analysis we encountered the below error

reactor.core.Exceptions$ErrorCallbackNotImplemented: org.springframework.web.reactive.function.client.WebClientResponseException: 200 OK from GET https://www.bijusapp/query?f=DAILY&symbol=adhani&apikey=bijusapp; nested exception is org.springframework.core.io.buffer.DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144
Caused by: org.springframework.web.reactive.function.client.WebClientResponseException: 200 OK from GET https://www.bijusapp/query?f=DAILY&symbol=adhani&apikey=bijusapp; nested exception is org.springframework.core.io.buffer.DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144


Solution


spring.codec.max-in-memory-size=50MB in application properties


Or


/**
 * 
 */


import org.springframework.context.annotation.Configuration;
import org.springframework.http.codec.ServerCodecConfigurer;
import org.springframework.web.reactive.config.EnableWebFlux;
import org.springframework.web.reactive.config.WebFluxConfigurer;

/**
 * @author bijusapp
 *
 */
@Configuration
@EnableWebFlux
public class WebFluxConfig implements WebFluxConfigurer {
@Override
public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) {
configurer.defaultCodecs().maxInMemorySize(16 * 1024 * 1024);
}

}

August 21, 2022

When to buy :: When to sell :: When to exit :: Swing trade | stock market explained

Hi Team

Here we explain the some best steps you can consider before start trading on any stock for short term. Our strategy is to get maxmimum profit (around 20 percentage) in a month with same capital.

  • How to pick up a stock
  • What strategies we are following
  • What all paramaters you need to analyse
  • How to analyse the graph pattern
  • When to buy , When to sell or when to exit
  • With an example (Motherson sumi wiring india ltd)

Best stock with returns huge profit


Best swing stock which may returns 10 percentage in 3 weeks, visit our stock list

How to pick up a stock


Consider breakout stocks, from any stock market websites like
chartlink  Or from telegram discussion group 

From Tickertape , Go to stock screener ( tools of the trade) apply the following filters





What strategies we are following


If you are planning to invest 1 Lakh rupees in swing trade, invest 10000 each in 10 trade. For swing trade we expect a return in 1 to 15 trade days, if any trade reached stop loss, you have 9 other stocks that achieved targets, again you can use the same capital for new swing trades.

For example

if 10 out of 5 Trade achieved target of 10 percentage in one week, you will get 5000 profit, and same capital ie 50000 can be invested in another 5 trades.

if  10 out of 3 Trade achieved target of 10 percentage in second week, you will book a profit of 3000 in coming week, again newly invested 5 trades may also book profit.

if 10 out of 2 reached stop loss in third week, you will have a small loss, even though monthly you can book a huge profit ( average more than 10 percentage with same capital of 1 Lakh)

What all paramaters you need to analyse


  • Current news on that particular stock
  • Know about the organisation, their subsidaries, their products etc. About tab in screener will help you for this https://www.screener.in/
  • Average brocker target from tredlyne
  • Forecast & Rating in tickertape (Buy siginal)
  • Strength, weekness and opportunity from tredlyne
  • Check the durability score, buyers volume etc

How to analyse the graph pattern


Usually we go with cup & handle pattern Or morning star pattern. For morning star pattern we need to analyse the stock for 3 days

Example MSUMI (june 16 2022)

MSUMI morning star candle pattern formed on jun 16 2022

MSUMI news on june 16 2022 



When to buy , When to sell or when to exit

You can see where we set up our target and stop loss

For MSUMI, after trend reversal on jun 16 2022, the stock price increased from 64.00 to 78.00, able to book a profit of 22 percentage. 

In additon to candle graph pattern, we added MACD indicators, RSI (Relative strenght index ) & Volume graph.

We check whether there is a MACD cross over, RSI value is between 30 & 70, and a high volume of buyers in volume graph

Target and stop loss



If you want to open a account in zeroda or upstock, use the link





Thanks for reading our blog

subscribe our youtube channel for daily updates

























                                 DISCLAIMER
I AM NOT A SEBI REGISTERED ADIVISER.ALL MY VIDEOS, POST ARE RECOMMENDATIONS ARE ONLY FOR EDUCATIONAL AND MOTIVATIONAL PURPOSE.PLEASE DONT TAKE RISK ON YOUR HARD EARN MONEY ON THE BASIS OF MY RECOMMENDATION AND VIDEOS.MUST TAKE ADVICE FROM YOUR FINANCIAL ADVISER BEFORE PUTTING REAL MONEY INTO STOCK MARKET.

July 07, 2022

How to use observable pattern to notify stock market breakouts entry stoploss


Created a stock market application by implementing observable pattern.
In observable pattern the subsribers will be notified when ever there is any event occured in publishers object. In our example stock is the publisher ( Observables) and we kept a list of subscribers list in NotificationManager class.



Stock.java


package com.learning.designpattern.observer;

import java.io.File;
/**
 * Stock class
 * Act as Observable or publisher
 * 
 * Where ever a change happens in Stock object (publisher), it will notifies the subscribers
 * 
 * two methods stoploss() & entry() corresponds to file opening and saving events
 * 
 *
 * 
 * 
 * @author smithesh k k
 *
 */
public class Stock {

private Breakout breakout;
public NotificationManager events;

public Stock() {
this.events = new NotificationManager(); 
}

public void stoploss(String nseTicker) {
if (!nseTicker.isEmpty()) {
this.breakout = new Breakout(nseTicker);
events.notify(Alerts.STOPLOSS.toString(), breakout);
}
}

public void entry(String nseTicker) {
if (!nseTicker.isEmpty()) {
this.breakout = new Breakout(nseTicker);
events.notify(Alerts.ENTRY.toString(), breakout);
}
}

}

NotificationManager.java


/**
 * 
 */
package com.learning.designpattern.observer;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *  NotificationManager
 *  
 *  keeps the subscriber list ( watchlist), through NotificationManager you can subscribe or unsusbscribe for an event
 *  
 *  notify() helps to notify the subscribers/observer's
 * 
 * 
 * @author bijuvas
 *
 */
public class NotificationManager {

private Map<String, List<EventListener>> watchlist;
public NotificationManager() {
this.watchlist = new HashMap<>();
addEvents();
}
public void notify(String eventType, Breakout file) {
List<EventListener> users = watchlist.get(eventType);
users.forEach(user -> {
user.update(eventType, file);
});
}
public void subscribe(String eventType, EventListener listener) {
List<EventListener> users = watchlist.get(eventType);
users.add(listener);
}
public void unsubscribe(String eventType, EventListener listener) {
List<EventListener> users = watchlist.get(eventType);
users.remove(listener);
}

public void addEvents() {
final Alerts[] alerts = Alerts.values();
for (Alerts event : alerts) {
            this.watchlist.put(event.toString(), new ArrayList<>());
        }
}
}

EventListener.java


/**
 * 
 */
package com.learning.designpattern.observer;

/**
 * EventListener
 * 
 * update()
 * 
 * @author sreekumar
 *
 */
public interface EventListener {
public void update(String eventType, Breakout breakout);
}


EmailNotificationListener.java


/**
 * 
 */
package com.learning.designpattern.observer;

/**
 * EmailNotificationListener
 * 
 * @author perambra kozhikode
 *
 */
public class EmailNotificationListener implements EventListener {
private String email;
public EmailNotificationListener(String email) {
this.email = email;
}

@Override
public void update(String eventType, Breakout breakout) {
System.out.println(" email send to "+email +" for "+eventType);
}

}


MainClass.java


/**
 * 
 */
package com.learning.designpattern.observer;

/**
 * @author valiyakode
 *
 */
public class MainClass {

/**
* @param args
*/
public static void main(String[] args) {
Stock editor = new Stock();
NotificationManager event = editor.events;
event.subscribe(Alerts.STOPLOSS.toString(), new EmailNotificationListener("test@gmail.com"));
editor.stoploss("SGX");
}

}


Breakout.java


/**
 * 
 */
package com.learning.designpattern.observer;

/**
 * @author Zamorins Guruvayoorappan college
 *
 */
public class Breakout{  //implements Strategies{

public Breakout(String nseTicker) {

}


Alerts.java


/**
 * 
 */
package com.learning.designpattern.observer;

/**
 * @author lijesh
 *
 */
public enum Alerts {
TARGET1, ENTRY, TARGET2, STOPLOSS;

}


Full source code


Git url
 

June 27, 2022

Sources must not be empty | java.lang.IllegalArgumentException | Spring boot application

Issue reported


2022-06-27 16:13:04.789  INFO 6348 --- [           main] o.s.boot.SpringApplication               : Starting SpringApplication v2.6.0 using Java 11.0.7 on apple-pc with PID 6348 (E:\Aswathi\maven_repo\org\springframework\boot\spring-boot\2.6.0\spring-boot-2.6.0.jar started by aswathi in E:\Aswathi\repo\stockmaster\nyseticker)
2022-06-27 16:13:04.793  INFO 6348 --- [           main] o.s.boot.SpringApplication               : No active profile set, falling back to default profiles: default
2022-06-27 16:13:04.828 ERROR 6348 --- [           main] o.s.boot.SpringApplication               : Application run failed

java.lang.IllegalArgumentException: Sources must not be empty
at org.springframework.util.Assert.notEmpty(Assert.java:470) ~[spring-core-5.3.13.jar:5.3.13]
at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:403) ~[spring-boot-2.6.0.jar:2.6.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:301) ~[spring-boot-2.6.0.jar:2.6.0]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-2.6.0.jar:2.6.0]
at org.springframework.boot.SpringApplication.main(SpringApplication.java:1317) ~[spring-boot-2.6.0.jar:2.6.0]

Solution

Go to class where you have your @SpringBootApplication and right click -> run as java application.



  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.6.0)

2022-06-27 16:19:32.454  INFO 3160 --- [           main] c.p.nyseticker.NysetickerApplication     : Starting NysetickerApplication using Java 11.0.7 on apple-pc with PID 3160 (E:\Aswathi\repo\stockmaster\nyseticker\target\classes started by apple in E:\Aswathi\repo\stockmaster\nyseticker)
2022-06-27 16:19:32.460  INFO 3160 --- [           main] c.p.nyseticker.NysetickerApplication     : No active profile set, falling back to default profiles: default
2022-06-27 16:19:34.141  INFO 3160 --- [           main] c.p.nyseticker.NysetickerApplication     : Started NysetickerApplication in 2.955 seconds (JVM running for 4.258)



April 21, 2022

Stock market trading | morning star candle stick pattern explained | How to set up an entry point | best to buy




Sample graph : Morning star candle stick pattern explained

we have taken last 3 month stock trading of SBI, in the yellow color we marked morning start candle stick pattern.

What is morning star candle stick pattern ?


Its a 3 candle stick pattern (Multiple candle stick pattern) which denotes 3 successive days.

for example apr 21 2022, apr 22 2022, apr 23 2022 in each candle.

Its a trend reversal pattern.


How and where to check morning star candle stick pattern?


Check whether the morning star candle stick pattern is formed after a downtrend.

In morning star candle pattern

1. The first candle will a bearish one

2. The second candle will be either a doji or spinning top, here the color may be green or red

if its green then its a good indicator to buy

The second candle should be a gap down opening, ie the opening value should be lesser than first candle closing value.

3. The third one must be a bulish candle and opening should be gap up opening.


What morning star candle stick says?


Its a entry point for short term or long term.











March 07, 2022

Stock market trading | candle stick pattern explained | How to set up an entry point | break out | buy or sell decision

Descending Triangle Pattern 



Represents stock consolidation, prior downtread before triangle formation.

Result : either be berish or bullish, but mostly berish.

Entry : breakout with maximum volume trying to break triangle pattern.

Target : maximum width of triangle price range.

Stop loss : 

Facebook comments