Quantcast
Channel: Market Calls
Viewing all 2070 articles
Browse latest View live

Importance of Poor High and Poor Low in Market Profile

$
0
0

In this video tutorial, we are going to look closer into poor high and poor low and how it is different from weak high and weak low. Also, we look closer into the Trader’s and Investors’ behavior at various price levels.

In case if you are very new to the Market Profile tutorial and get to know the basics of market profile then start with this market profile tutorials

For deeper insights on Market Profile and Orderflow join TradeZilla 3.0 – 85+ hour of mentorship program for Active Traders

Related Readings and Observations


What Could Possibly Go wrong with Nifty?

$
0
0

Historical PE-Ratio of Nifty

Chart Courtesy : Nifty PE Ratio

As of last 9th Oct 2020 closing of Nifty (11914), PE ratio stands at 34.71. By any means, it indicates euphoric markets.

The above charts show the historical PE-Ratio of Nifty. Recently there is a hockey stick growth in the PE ratio of Nifty since the Mar 2020 lockdown. The rate at which the PE ratio is growing rapidly over the last couple of months indicates that  that investors are expecting higher earnings growth in the future and on the other side it also means kind of fundamentally overbought levels from the investing timeframe perspective

At this point of time Financial services contributing 1/3rd of the total weightage in the Nifty 50 index. And next to financial services Oil and Gas and IT sector are the dominant forces actively moving the Nifty 50 near to 12000 levels.

PE ratio tells us how investors value one rupee of per-share-earnings. For example, if the P/E ratio is 34.71, it means investors are willing to pay up to 34.71 times for one rupee of per-share-earnings.

Currently, the PE ratio is way above 3 standard deviation levels which statistically indicates an overheated Euphoric market environment where investor show irrational behavior and chasing the price is the primary motive from the investors and hardly anybody cares about how overvalued a particular stock is and what is the actual value of the stock.

Investors simply Buy the stocks just because it is going up and momentum gears are in top speed.

As per the latest NSEindia Fact sheet for Nifty 50 indicates Reliance and HDFC Bank are the top heavy weights

Returns since the 1st Apr 2020

Post the March 2020 Nationwide lockdown the top 10 Nifty contributors provided fantastic return. Top returns comes from Reliance with more than 100+ returns due to the continuous news flow followed by the IT heavy weights TCS and INFY with 65% and 86.11% returns respectively. And the least returns comes from the FMCG counter Hindustan Unilever and ITC with -0.74% and 6.06% respectively.

India Ranked 4th under the top fundamentally overvalued ratio metrics

So, What do you think? What could possibly go wrong this time? Is it different this time?

Related Readings and Observations

Important Announcement: Algmojo is Free for Users Under Discount Broking Plan

$
0
0

Since the launch of Algomojo (29th June 2020), we have been amazed by the response from the Algomojo users, and Algomojo always striving to bring down the overall essential cost of the Algo traders with more features and facilities at one single market place.

And now to meet the demand of Discount Broking Plan users we are offering free API + Free Platform with No upfront fees,  no minimum turnover, no special terms and conditions, no clauses, no strings attached.

What is the Overall Cost Involved in Algomojo?

Traders opening trading account via Algomojo with our partner brokers (Currently Aliceblue, Enrich, Tradejini, Zebu) will be enjoying Free API + Free Platform Fee under both Discount Broking (Rs20 per order / Percentage Based Broking Model (0.01%) or whatever the broking plan our partner broker offers).

Here are the List of Cost Involved while deploying Algos

1)Trading API Cost: Free (For Algomojo Account Opening Clients)
2)Algomojo Platform Fee: Free (For Algomojo Account Opening Clients)
3)Datafeed Cost: Optional
4)Data API Cost: Optional
4)Strategy Cost: Both Free Strategy and Proprietary Trading Strategies Available (Optional). Traders can deploy their own Trading Strategies
5)Supportive Platforms: Amibroker, Metatrader, Tradingview, Excel, C#, Python, Any Platforms that Supports Rest-HTTP APIs
6)Virtual Private Servers: Optional
7)Broking Charges: All F&O and equity trades would continue to be charged at Rs 20 or 0.01% according to your broking plan with our partner Broker and there are no restrictions on choosing on your broking plan with partner broker. Irrespective of the broking plan Algomojo client will enjoy Unlimited & Lifetime free access to Trading API and Algomojo Platform.
8)End to End Integration/Chat Support: Free.

Algomojo Provides data products for NSE Cash, NSE Futures, MCX Futures & NSE Currencies, and currently tied up with Authorized data vendors GlobalDatafeeds & Truedata to offer data & data API products to its customers.

What is the Pricing for Non-Algomojo Clients?

Currently, Non-Algomojo clients who wants to onboard Algomojo Platform with their existing broking account but not mapped under Algomojo will avail free Algomojo API access however there will be a platform fee of Rs 2000/ month or Rs12000/year will be charged and that platform fee will be completely waived off for those taking Tradestudio Subscription / Directly opening a Trading account under Algomojo.

7 Days of Free Trial is available for Non-Algomojo clients to test drive before paying Algomojo Platform Subscription fee.

Trading Terminal Access is totally free for Non-Algomojo Clients to send orders manually/retrieving the orderbook/tradebook/open positions/watchlists from Algomojo to their broker account.

What are the Type of Orders Supported at Algomojo?

All types of orders are supported at Algomojo (Market Order, Limit Order, SL-Limit Order SL-MKT order, Bracket Order, Cover Order, AMO orders).

Algomojo also supports rule based ATM, ITM, OTM Option Orders

Algomojo supports Order Placement, Order Modification, Order Execution and Retrieval of Orderbook, Trade Book, Order History & Open Positions via API.

Algomojo API documentation

Algomojo comes with an inbuilt Free API which also supports existing clients of partner broker and compatible among different partner brokers. For detailed documentation visit here

Is the Web-Based Bridge Slower than the Exe Based Bridge?

Nope. Both use Rest API as a communication layer to transmit or receive information from the broker server. The latency of execution mostly depends upon the client’s internet speed and Brokers’ server responsiveness. In another article will look into this information in detail. However, it is a myth that Web-Based Bridge is slower compared to Exe based Bridge. In-fact web-based bridge has more ease of use and no up-gradation/installation required from the client’s side.

What are the Upcoming Features?

At Algomojo we been striving not only to bring down the overall cost of the Algo traders but algo bringing newer technology & innovative methods, newer platforms to make the overall algo trading experience of users as smooth as possible.

Here are the upcoming features expected in the next Phase of Release

1)Paper trading before taking the trading strategy to live. Expected to be released in next Phase

2)Smart in-built strategy templates to introduce smart execution in your trading strategies

3)Integrating Telegram Bots with Algomojo to send Alerts to your Telegram Account.

4)Ability to do algomojo with more trading platforms.

If you are already a Broker/ Authorized Person/ Sub-Broker/ Educational Provider/ Research Analyst/ Investment Advisor looking for a partnership with Algomojo then kindly do send an email request at partners@algomojo.com


Related Readings and Observations

How to Send Automated Bracket Order from Trading View Strategy to Algomojo Platform

$
0
0

This tutorial explains how to send Automated Bracket orders from Trading view strategies to the Algomojo Trading Platform. Tradingview Supports strategies that contain rules in a pinescript language that instructs the system when to Buy/Sell orders, Modify, Cancel Orders.

Tradingview Strategies allow you to perform backtesting (emulation of a strategy trading on historical data) and forward testing (emulation of a strategy trading on real-time data) according to your algorithms.

What is a Bracket Order?

Bracket order (BO) is a type of order where you can enter a new position along with a target/exit and a stop-loss order. As soon as the main order is executed, the system will place two more orders (profit taking and stop-loss). When one of the two orders (profit taking or stop loss) gets executed, the other order will get cancelled automatically. Bracket orders are essentially algo orders.

Bracket orders can be used only for intraday trades. All bracket orders will be squared off automatically before market close. BOs aren’t allowed on BSE stocks, stock options, currency options, and MCX.

Important Note : Currently you can place the bracket order automatically with predefined target and stoploss/trailing stoploss. However in case if you want to modify the stoploss/exit the bracket order one have to do it manually by going to the algomojo orderbook and exiting manually/modifying the stop or target levels manually from there.

If you are very new to the Algomojo Platform then kickstart with this tutorial

How to Send Automated Option Orders Tutorial

In order to send market orders from Tradingview to Algomojo in the previous tutorial, we have seen how to use Tradingview webhook feature to configure Automated orders using the Tradingview Alert Option.

In the previous tutorial, we also have seen How to Send Orders Dynamically using Tradingview Webhook Facility,Placeholders and Tradingview Pinescript strategy

Among All the Place Holders we are going to use {strategy.order.comment}} which reads the comment from the strategy section and change the order type dynamically based on the supertrend Buy or Sell Signal.

//Alerts
alertcondition(buySignal, title="SuperTrend Buy", message="SuperTrend Buy!")
alertcondition(sellSignal, title="SuperTrend Sell", message="SuperTrend Sell!")

longCondition = buySignal
if (longCondition)
    strategy.entry("BUY", strategy.long, when = window(),comment="B")
shortCondition = sellSignal
if (shortCondition)
    strategy.entry("SELL", strategy.short, when = window(),comment="S")

Comment PlaceHolder

{{strategy.order.comment}} – returns the comment of the executed order (the string used in the comment parameter in one of the function calls generating orders: strategy.entry, strategy.exit or strategy.order). If no comment is specified, then the value of strategy.order.id will be used.

Configuring Alerts

1)Select the required Timeframe.
2)Apply the Pinescript Buy or Sell Trading Strategy and
3)Click on the Alert option to configure alerts to trigger alerts from that particular timeframe.

Under the Alert Condition Tab use the drop down and change to Supertrend Algomojo and enable the Webhook URL option as shown below

Broker - Aliceblue 
https://abapi.algomojo.com/1.0/PlaceBOOrder 

Broker - Tradejini
https://tjapi.algomojo.com/1.0/PlaceBOOrder 

Broker - Zebu
https://zbapi.algomojo.com/1.0/PlaceBOOrder

Configure the Webhook Message with Placeholders

Here is the sample message with necessary placeholders

configure your API Key and API Secret key from the Algomojo portal. Here is the sample code which place Buy and Sell order for Reliance with 2 shares in intraday mode.

{
  "api_key":"8f8cb9504bb91bd5472b68483cbda8bb",
  "api_secret":"845802a70c8881a66cccfde02d83934d",
  "data":
    {
      "strg_name": "BO Strategy",
      "s_prdt_ali":"BO:BO||CNC:CNC||CO:CO||MIS:MIS||NRML:NRML",
      "TokenNo":"2885",
      "exch":"NSE",
      "Ttranstype":"{{strategy.order.comment}}",
      "Ret":"DAY",
      "qty":"2",
      "discqty":"0",
      "Price":"0",
      "ltpOratp":"NA",
      "SqrOffAbsOrticks":"Ticks",
      "SqrOffvalue":"10",
      "SLAbsOrticks":"Ticks",
      "SLvalue":"10",
      "trailingSL":"0",
      "tSLticks":"10"
    }
}

Copy the above code modify according to your need and paste in the Alert Webhook comments block as shown below

Getting the Token ID for sending Bracket Orders

Token ID is provided by the brokers and it is unique for each and every symbol. Go to the Watchlist in the Algomojo Symbols. Click on the Security Info of that Particular symbol to retrieve the Token ID

Retieve the Token ID corresponding to that particular symbol. As shown below for Reliance Industries the token no is 2885 and it is unique for each and every ttrading symbols which is mandatory for sending Bracket Orders from Tradingview platform to Algomojo.

use the retrieved Token No to configure Webhook Message as shown above.

Here is the Complete Pinescript Strategy and to place automated orders ensure one configures the Alert Settings as mentioned above.


// Algomojo Trading Strategy


//@version=4
strategy("SuperTrend Algomojo Trading Strategy", overlay=true)



//inputs
Periods = input(title="ATR Period", type=input.integer, defval=10)
src = input(hl2, title="Source")
Multiplier = input(title="ATR Multiplier", type=input.float, step=0.1, defval=3.0)
changeATR= input(title="Change ATR Calculation Method ?", type=input.bool, defval=true)
showsignals = input(title="Show Buy/Sell Signals ?", type=input.bool, defval=true)
highlighting = input(title="Highlighter On/Off ?", type=input.bool, defval=true)
barcoloring = input(title="Bar Coloring On/Off ?", type=input.bool, defval=true)

atr2 = sma(tr, Periods)
atr= changeATR ? atr(Periods) : atr2
up=src-(Multiplier*atr)
up1 = nz(up[1],up)
up := close[1] > up1 ? max(up,up1) : up
dn=src+(Multiplier*atr)
dn1 = nz(dn[1], dn)
dn := close[1] < dn1 ? min(dn, dn1) : dn
trend = 1
trend := nz(trend[1], trend)
trend := trend == -1 and close > dn1 ? 1 : trend == 1 and close < up1 ? -1 : trend
upPlot = plot(trend == 1 ? up : na, title="Up Trend", style=plot.style_linebr, linewidth=2, color=color.green)
buySignal = trend == 1 and trend[1] == -1
plotshape(buySignal ? up : na, title="UpTrend Begins", location=location.absolute, style=shape.circle, size=size.tiny, color=color.green, transp=0)
plotshape(buySignal and showsignals ? up : na, title="Buy", text="Buy", location=location.absolute, style=shape.labelup, size=size.tiny, color=color.green, textcolor=color.white, transp=0)
dnPlot = plot(trend == 1 ? na : dn, title="Down Trend", style=plot.style_linebr, linewidth=2, color=color.red)
sellSignal = trend == -1 and trend[1] == 1
plotshape(sellSignal ? dn : na, title="DownTrend Begins", location=location.absolute, style=shape.circle, size=size.tiny, color=color.red, transp=0)
plotshape(sellSignal and showsignals ? dn : na, title="Sell", text="Sell", location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.red, textcolor=color.white, transp=0)
mPlot = plot(ohlc4, title="", style=plot.style_circles, linewidth=0)
longFillColor = highlighting ? (trend == 1 ? color.green : color.white) : color.white
shortFillColor = highlighting ? (trend == -1 ? color.red : color.white) : color.white
fill(mPlot, upPlot, title="UpTrend Highligter", color=longFillColor)
fill(mPlot, dnPlot, title="DownTrend Highligter", color=shortFillColor)
FromMonth = input(defval = 9, title = "From Month", minval = 1, maxval = 12)
FromDay   = input(defval = 1, title = "From Day", minval = 1, maxval = 31)
FromYear  = input(defval = 2018, title = "From Year", minval = 999)
ToMonth   = input(defval = 1, title = "To Month", minval = 1, maxval = 12)
ToDay     = input(defval = 1, title = "To Day", minval = 1, maxval = 31)
ToYear    = input(defval = 9999, title = "To Year", minval = 999)
start     = timestamp(FromYear, FromMonth, FromDay, 00, 00)  
finish    = timestamp(ToYear, ToMonth, ToDay, 23, 59)       
window()  => time >= start and time <= finish ? true : false


//Alerts
alertcondition(buySignal, title="SuperTrend Buy", message="SuperTrend Buy!")
alertcondition(sellSignal, title="SuperTrend Sell", message="SuperTrend Sell!")

longCondition = buySignal
if (longCondition)
    strategy.entry("BUY", strategy.long, when = window(),comment="B")
shortCondition = sellSignal
if (shortCondition)
    strategy.entry("SELL", strategy.short, when = window(),comment="S")
buy1= barssince(buySignal)
sell1 = barssince(sellSignal)
color1 = buy1[1] < sell1[1] ? color.green : buy1[1] > sell1[1] ? color.red : na
barcolor(barcoloring ? color1 : na)

One the alert triggers automated orders will be placed instantly in algomojo platform

Where to Check the Order in Realtime in Algomojo

You can use order logs to check for any incoming automated orders generating from Tradingview Webhooks in Realtime and can also download the logs for later use.

Related Readings and Observations

Displaying Weather Dashboard in your Amibroker

$
0
0

Thought of brining weather data into Amibroker. Googled for free weather api data. OpenWeathermap came to my notice. Using Openweathermap one can get weather data for any location on the globe immediately.

Sample Weather Output

{"coord":{"lon":77.6,"lat":12.98},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"base":"stations","main":
{"temp":294.15,"feels_like":297.36,"temp_min":294.15,"temp_max":294.15,"pressure":1012,"humidity":100},"visibility":6000,"wind":
{"speed":1.39,"deg":288},"clouds":{"all":75},"dt":1602971629,"sys":
{"type":1,"id":9208,"country":"IN","sunrise":1602981608,"sunset":1603024139},"timezone":19800,"id":1277333,"name":"Bengaluru","cod":200}

Amibroker AFL Code to get the Weather Dashboard

Code requires Amibroker 6.17 as some of the new AFL functions like InternetClose( handle ) , InternetOpenURL( “url” ) , InternetReadString( handle ) – which is essecial to read from internet resource/http api is available from v6.17 or higher version.

// Coder - Rajandran R
// Founder - Marketcalls.in & Co-Founder - Algomojo.com
// Algomojo Provides Free API + Free Trading Bridge for API Based Automated Trading
// Creation Date : 15th Oct 2020
// Weather Display Dashboard




_SECTION_BEGIN("Weather Display Dashboard");
Version(6.17);  //Code is Compatible with 6.17 and Higher
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", colorDefault, styleNoTitle | styleCandle | GetPriceStyle() ); 

city = ParamStr("City","Bangalore");

ih = InternetOpenURL( "http://api.openweathermap.org/data/2.5/weather?q="+city+"&appid=1f082c296a4b6013f8976bdf820147c2" );

if( ih )
{
     while( ( str = InternetReadString( ih ) ) != "" )
     {
         //printf( "%s", str );
          for( item = -1; ( sym = StrExtract( str, item,'{' )) != ""; item-- )
	 {
	 
	 if(item == -4)
	 {
	 //printf( "%s", sym );
	 
	 for( jitem = -1; ( temp = StrExtract( sym, jitem,',' )) != ""; jitem-- )
	 {
	 printf( "\n%s", temp );
	 if(Strfind(temp,"temp"))
	 {
     temp1 = StrExtract(temp,1,':');
     temp1 = StrTrim(temp1,"\"");
    //_TRACE("\nTemperature : "+NumToStr(StrToNum(temp1)-273.15) +" Degree Celsious");
	 }
	 
	 if(Strfind(temp,"feels_like"))
	 {
     fl = StrExtract(temp,1,':');
     fl = StrTrim(fl,"\"");
    //_TRACE("\nFeels Like : "+NumToStr(StrToNum(fl)-273.15)+" Degree Celsious");
	 }
	 
	 
	 if(Strfind(temp,"humidity"))
	 {
     hm = StrExtract(temp,1,':');
     hm = StrTrim(hm,"\"");
     hm = StrTrim(hm,"}");
    //_TRACE("\nHumidity : "+hm);
	 }
	 
	  if(Strfind(temp,"pressure"))
	 {
     pr = StrExtract(temp,1,':');
     pr = StrTrim(pr,"\"");

    //_TRACE("\nPressure : "+pr);
	 }
	 
	 
	 }
	 
     
     }
	 }

     }
     InternetClose( ih );
      
}

//Display Weather Dashboard

GfxSetBkMode( 0 );
GfxSelectFont( "Tahoma", 13, 100 );
GfxSetTextColor( colorWhite );


GfxSelectPen( colorGreen, 2 ); 
GfxSelectSolidBrush( colorgreen ); 
GfxRectangle( 10, 20, 250, 180 );

GfxTextOut( "City : "+city,23,23); 
GfxTextOut( "Temperature : " +NumToStr(StrToNum(temp1)-273.15) +" °C" ,23,48); 
GfxTextOut( "Feels Like : " +NumToStr(StrToNum(fl)-273.15) +" °C",23,73);
GfxTextOut( "Humidity : " + hm+"%",23,98); 
GfxTextOut( "Pressure : " + pr+"hPa",23,123);
   
    

_SECTION_END();

Now I nevermind to short Nifty Futures if Bangalore weather is crossing 30 degree Celsius!

Related Readings and Observations

Practical Approach to Tradingview Pinescript Programming

$
0
0

Tradingview is one of the top 500 websites in the world powered with Interactive charts for various financial markets(stocks, futures, indices, cryptos, commodities). Undoubtedly, it is the first innovative charting product with access to historical and live intraday/EOD charts where one can build their own custom indicators/strategies on top of it

What is Pinescript?

Tradingview is equipped with a powerful formula language (pinescript) allowing traders/coders to write trading system rules, define your own indicators, generate rule-based alerts, buy and sell arrow indications, and more.

In order to simplify the learning of pinescript we are offering an 8-day learning course on Tradingview Pinescript Programming which helps traders/developers to convert their trading ideas into indicators/strategies/automation.

When does the Course Starts

Course Starts from 2nd Nov 2020 onwards. It is a complete 8-day programming session on Pinescript.

Course Timings: 7p.m – 9p.m IST
Total Duration of the Course: 16 hours (2 hours/ day)

Customer Support: Mr Kalaiselvan (  +91 8105797152 )
Email Support : support@marketcalls.in / support@febinars.com

What is Covered in this Course?

Day 1 Agenda

1)Introduction to Tradingview Platform
2)Charting Tools, Indicators, Templates, Watchlist, Themes & Layouts
3)Data Window, Economic Calendar, Trading Community
4)Basic Introduction to Pinescript Programming Language & Pinescript Editor
5)Pinescript Syntax and Semantics
6)Learn How to Write your First Indicator using Pinescript

Day 2 Agenda

1)Understanding Plot functions
2)Understanding If/Else functions & Nested If-Else functions
3)Understanding Tradingview operators
4)Understanding Inbuilt Functions in Tradingview
3)Learn How to Write your First Trading Strategy in Pinescript
4)Working with colors and bar types in Pinescript
5)Drawings/Trendlines
6)Publishing Scripts to Public Library

Day 3 Agenda

1)Adding numerical inputs to a TradingView script
2)Adding true/false checkbox to a TradingView script
3)Creating a text box input option in Pinescript
4)Creating a TradingView session input to set a time range
5)Adding a symbol search box to a TradingView script
6)Adding a resolution input to a TradingView Pine script
7)Adding a source input type to a TradingView Pine script
8)Understanding Date & Time Functions
9)Understanding TradingView’s ticker variable
10)Understanding TradingView’s tickerid variable
11)Understanding User-defined Functions
12)Self Referencing and Forward referencing Variables.
13)Understanding Boolean Operations and IFF functions

Day 4 Agenda

1)Learn How to Backtest Your Trading Strategy in Pinescript
2)Pinescript Backtesting Strategy Metrics
3)Position Sizing in Pinescript
4)Pyramiding in Trading Strategies
5)Building Non-Repainting Trading Strategies for Automated Trading
6)Understanding Tradingview Strategy Orders

Day 5 Agenda

1)How to Configure & Generate Alerts
2)Understanding variables in Tradingview Alerts
3)How to Send Automated Orders using Tradingview Webhook
4)Bar Replay Feature in Tradingview
5)Understanding Placeholders in Strategy Alerts
6)Plotting Buy and Sell Signals on Top of Trading Strategy

Day 6 Agenda

1)Creating Intraday Trading Strategies using Pinescript
2)How to Send Bracket Orders, Cover Orders, ATM/ITM/OTM Option Orders
3)How to Send Basket orders and Multi-Client Orders using pinescript
4)Making a Trading Bot right from Scratch.
5)Public Scripts

Day 7 Agenda

1)Screeners and Sending Automated Orders from Screeners
2)How to Run Multiple Trading Strategies at Once
3)Paper Trading in Tradingview
4)Tradingview Risk Management Functions
5)Intraday-Risk Management Functions
6)Implementing per day/per week Strategy level stop-loss
7)How to stop the trading system after consecutive losses/wins in a row.

Day 8 Agenda

1)Building Trading Strategies with Stoploss and Targets
2)Building Trading Strategies with Trailing Stoploss
3)Implementing Trend Following, Price Action Strategies
4)Implementing Mean Reversion Strategies
5)Implementing Multi Timeframe Strategies

Who Should Join?

Anybody who wants to learn Tradingview Pinescript Programming Language to create their own trading indicators, strategies or automated trading can join the course.

What are the Pre Requisite?

Basics of Tradingview Program. No Prior Coding knowledge is required. However any coding knowledge will be fasten up your learning speed.

Does the Recorded Course Access Available?

Yes, all our sessions will be recorded and entire course access will be available for repeated learning from our courses portal. Access will be provided up to duration of 1 Year.

What are the Learning Materials will be Shared?

All the Presentation Materials, Pinscript Coding (Indicators, Strategies, Auto Trading Codes) will be shared in the courses portal.

Whom I have to contact if I have a doubt?

Lifetime access to Slack will be provided on the subscription of course. Where you can ask your questions in Market Profile Channel anything related to Market Profile, Volume Profile & Orderflow

Will I get a certificate at the completion of the course?

Yes, you will be awarded the “Certification of Excellence” from Marketcalls after successfully completing the online learning units.


What are the system requirements to do this course?

A fast-speed internet connection and a browser application are required for this course. For the best experience, use Chrome

Related Readings and Observations

Introduction to TradingView Platform – Live Webinar

$
0
0

In this webinar, Mr Abhishek H.Singh,CMT (Growth Director – Tradingview) will walk you through the Tradingview Platform, features, Drawing tools that are essential for an active trader/investor. You will be learning about advance indicators, setting price alerts, and how to take advantage of social community tools from Tradingview, and a lot more things that you need to know about the Tradingview Platform.

Event Date & Timings : 22nd Oct 2020 (7p.m – 8p.m IST)

About the Speaker

Abhishek Sign is a Mechanical Engineer from Bharati Vidhyapeeth College of Engineering, Navi Mumbai 2001, entered into financial markets post a short 2 year stint as Site Engineer at HVAC (Heating & Ventilation) department for Voltas Ltd, Bangalore. Worked as Sales manager with Kotak Commodities & other brokers finally to be part of Network18 group company -NewsWire18 Ltd (Year 2010) now known as Cogencis Information Services Ltd was the platform where he got attracted to technical analysis.

His love & passion for markets got a firm footing with professional certification- CMT (Chartered Market Technician) -2015.

Who Should Attend?

Students, Newbie Traders, experienced traders/investors, brokers/sub-brokers, and those who are very curious about knowing the in and out features of the Tradingview platform.

In his current role as Growth Director(TradingView), he takes care of the development and promotion of Tradingview(India) – a dedicated Indian sub-community on the TradingView platform.

Related Readings and Observations

Algomojo Autocancellation of Limit Orders After N seconds

$
0
0

In this tutorial, I’m going to demonstrate how to use Amibroker AFL code to perform auto cancellation of limit order after N seconds in Algomojo Platform. Let say I want to send 100 shares of INFY and if the fill is not happening immediately within the next 10 seconds from the executed order I want to cancel the placed orders automatically.

Here is the sample Amibroker Code which does the logic and provides the control to specify the amount of seconds to cancel the limit order trade.

The below mentioned code is just a prototype and for educational purpose only not for real-world executions.

//Algomojo Limit Order and Autocancellation after N Seconds
//Coded by Rajandran R
//Founder - Marketcalls & Algomojo - CoFounder
//Websites : www.algomojo.com & www.marketcalls.in

_SECTION_BEGIN("Algomojo Limit Order and Autocancellation after N Seconds");



function GetSecondNum()
{
    Time        = Now( 4 );
    Seconds     = int( Time % 100 );
    Minutes     = int( Time / 100 % 100 );
    Hours   = int( Time / 10000 % 100 );
    SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds );
    return SecondNum;
}

//_TRACE("seconds :"+GetSecondNum());

PlaceOrder = ParamTrigger("PlaceOrder","PRESS");
CancelOrder = ParamTrigger("CancelOrder","PRESS");
PositionBook = false; //ParamTrigger("PositionBook","PRESS");



user_apikey = ParamStr("user_apikey","c1997d92a3bb556a67dca7d1446b7087"); //Enter your API key here
api_secret = ParamStr("api_secret","5306433329e81ba41203653417063c71"); //Enter your API secret key here
clnt_id = ParamStr("Client ID","TS2499");
s_prdt_ali = ParamList("s_prdt_ali","BO:BO|CNC:CNC|CO:CO|MIS:MIS|NRML:NRML",3); //Type of order
Tsym = ParamStr("Tsym","YESBANK-EQ"); //Enter the symbol name here
exch = ParamList("Exchange","NFO|NSE|BSE|CDS|MCX|NCDEX|BFO|MCXSXFO|MCXSX",1); 
Ret = ParamList("Ret","DAY|IOC",0);
Ttranstype = ParamList("Ttranstype","B|S",0);
prctyp = ParamList("prctyp","MKT|L|SL|SL-M",0);
sectocancel = Param("Sec to Cancel LMT order", 10, 3, 60,1);
Pcode = ParamList("Pcode","NRML|BO|CNC|CO|MIS",4);
Price = Param("Limit Price",0,1,100000,1);
TrigPrice = ParamList("TrigPrice","0");
qty = Param("Quatity",75,0,100000,1); 
discqty = ParamList("discqty","0");
AMO = ParamList("AMO","NO|YES",0); //After market order
TokenNo = ParamStr("TokenNo","11184"); //Enter the token number of the symbol here
ltpOratp = ParamList("ltpOratp","LTP|ATP",0);
SqrOffAbsOrticks = ParamList("SqrOffAbsOrticks","Absolute|Ticks",0); //If you select absolute then you can enter a decimal quantity. If you selected ticks you need to enter in multiples of ticks
SqrOffvalue = ParamStr("SqrOffvalue","1"); 
SLAbsOrticks = ParamList("SLAbsOrticks","Absolute|Ticks",0);
SLvalue = ParamStr("SLvalue","1");
trailingSL = ParamList("trailingSL","Y|N",0); 
tSLticks = ParamStr("tSLticks","1"); //Trailing SL value in ticks if user has opted to use trailingSL
stgy_name = ParamStr("Strategy Name", "Test Strategy Chart");








if (PlaceOrder) {

algomojo=CreateObject("XLAMIBRIDGE.Main");
api_data ="{\"stgy_name\":\""+stgy_name+"\",\"s_prdt_ali\":\""+s_prdt_ali+"\",\"Tsym\":\""+Tsym+"\",\"exch\":\""+exch+"\",\"Ttranstype\":\""+Ttranstype+"\",\"Ret\":\""+Ret+"\",\"prctyp\":\""+prctyp+"\",\"qty\":\""+qty+"\",\"discqty\":\""+discqty+"\",\"MktPro\":\""+"NA"+"\",\"Price\":\""+Price+"\",\"TrigPrice\":\""+TrigPrice+"\",\"Pcode\":\""+Pcode+"\",\"AMO\":\""+AMO+"\"}";
resp=algomojo.AMDispatcher(user_apikey, api_secret,"PlaceOrder",api_data);

StaticVarSetText("NestOrderId", StrTrim( resp, "{\"NOrdNo\":" ));
StaticVarSetText("NestOrderId", StrTrim( StaticVarGetText("NestOrderId"), "\",\"stat\":\"Ok\"}" ));



StaticVarSet("OrderTime",GetSecondNum(),persist = True);
_TRACE("Order Response : " +resp);
_TRACE("Order Time : " +Now());
_TRACE("Nest Order Id : " +StaticVarGet("NestOrderId"));
_TRACE("Seconds Left to Cancel the Order : " +sectocancel+" secs");
StaticVarSet("IfOrderPlaced",1);
}

//Manual Cancellation
if(CancelOrder)
{

algomojo=CreateObject("XLAMIBRIDGE.Main");
api_data ="{\"uid\":\""+clnt_id+"\",\"NestOrd\":\""+StaticVarGetText("NestOrderId")+"\",\"sTradeSymbol\":\""+Tsym+"\",\"s_prdt_ali\":\""+s_prdt_ali+"\",\"sExch\":\""+exch+"\"}";
resp=algomojo.AMDispatcher(user_apikey, api_secret,"CancelOrder",api_data);
//OrderTime        = Now( 4 );
_TRACE("Order Response : " +resp);
_TRACE("Cancelled Time : " +Now());
}

//Automated Timer Based Cancellation
//If Trade is Placed then cancel the order after n seconds
if(StaticVarGet("IfOrderPlaced"))
{
diff = GetSecondNum() - StaticVarGet("OrderTime");
_TRACE("Timer Starts to Cancel Order: "+ diff);
if(diff >sectocancel) //cancel after n seconds
{

algomojo=CreateObject("XLAMIBRIDGE.Main");
api_data ="{\"uid\":\""+clnt_id+"\",\"NestOrd\":\""+StaticVarGetText("NestOrderId")+"\",\"sTradeSymbol\":\""+Tsym+"\",\"s_prdt_ali\":\""+s_prdt_ali+"\",\"sExch\":\""+exch+"\"}";
resp=algomojo.AMDispatcher(user_apikey, api_secret,"CancelOrder",api_data);
_TRACE("Cancelled Time : " +Now());
_TRACE("Order Response : " +resp);
StaticVarSet("IfOrderPlaced", 0); //reset the flag

}


}


_SECTION_END();

_SECTION_BEGIN("Price1");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

In the upcoming algomojo we will be studying more algorithmic execution features. If in case you are looking for a specific algo execution feature then comment your requirements down below.

Related Readings and Observations


How to Enable the Log Feature in Amibroker while doing Algo Trading using Algomojo?

$
0
0

This quick video tutorial explores how to use the log features in Amibroker to record your trades. Logging your trades is the most important part of automated trading to troubleshoot/debug your trading strategy and to find if there is any deviation between trading logic and trade execution?

Amibroker provides the log window feature which helps traders to do the following this

  • edit-time errors displayed during formula check
  • run-time errors that occur when formula is running (not edited)
  • _trace command output within AmiBroker (without using 3rd party debug view)

In order to get the Amibroker Log Open Amibroker -> Windows Menu -> Log

Amibroker Log helps algotrader in the following way

1)Captures the Trade, Trade Qty, Trade Time
2)Captures the Chart ID, Algo Status, Trading Strategy Name
3)Amibroker Generated Signals

which can be used further to do end of the day audit to ensure all the orders are placed properly. In case of any deviation from the logs with the Algomojo Order Log one can fix if there are any deviation in your algo trading process.

Note that _TRACE output is by default directed to outside debugger (like DebugView), in order to enable internal display you need to switch appropriate option in the Tools->Preferences->AFL You can choose to display internally / externally or in both places

Make sure that logs are enabled so that it helps you to decode your trades in case if something goes wrong. If in case you want to save the logs copy the log content from Amibroker Log window and paste it in a notepad/wordpad and save it.

Related Readings and Observations

How to Send Time Based Automated Orders using Algomojo?

$
0
0

This video tutorial explores time-based automated order execution from Amibroker to Algomojo Platform. Generally, Time Based Execution is generally required to close your intraday orders on time or to do automated time-based options hedging to your positions.

You can download the Algomojo Time Based Order Execution Modules by logging into Algomojo-> Tools -> Amibroker Modules

Here is the step by step guidance on how to test Algomojo Time Based Execution Module

Algomojo Time Based Execution Module for Amibroker

//Algomojo Time Based Exection Module//



// Developer: Rajandran R (Founder - Marketcalls / Co-Founder - Algomojo)
// Date: 28-Oct-2020
// Website: algomojo.com / marketcalls.in



_SECTION_BEGIN("Algomojo Timing Module");

RequestTimedRefresh(1, False);

function GetSecondNum()
{
    Time = Now( 4 );
    return Time;
}

user_apikey = ParamStr("user_apikey","xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); //Enter your API key here
api_secret = ParamStr("api_secret","xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); //Enter your API secret key here
otime = ParamTime("Execution Time", "15:15:00", 0);
Otype = ParamList("Execution Type", "Buy|Sell",0);
s_prdt_ali = ParamList("s_prdt_ali","BO:BO|CNC:CNC|CO:CO|MIS:MIS|NRML:NRML",3); 
Tsym = ParamStr("Tsym","RELIANCE-EQ");
exch = ParamList("Exchange","NFO|NSE|BSE|CDS|MCX|NCDEX|BFO|MCXSXFO|MCXSX",1);
Ret = ParamList("Ret","DAY|IOC",0);
prctyp = ParamList("prctyp","MKT|L|SL|SL-M",0);
Pcode = ParamList("Pcode","NRML|BO|CNC|CO|MIS",4);
qty = Param("Quatity",40,0,100000,1);
AMO = ParamList("AMO","NO|YES",0);
Timedexecution = ParamList("Timed Order Execution", "Disable|Enable",0);
stgy_name = ParamStr("Strategy Name","Test Strategy Chart");
static_name = Name()+GetChartID()+interval(2)+stgy_name;

if(Timedexecution == "Enable")
{
SetChartBkColor(colorDarkGrey);
if(GetsecondNum() == otime AND StaticVarGet(static_name + otime) == 0)
{
    StaticVarSet(static_name + otime, 1);
    if( Otype == "Buy" )
    {
         algomojo=CreateObject("XLAMIBRIDGE.Main");
         api_data ="{\"stgy_name\":\""+stgy_name+"\",\"s_prdt_ali\":\""+s_prdt_ali+"\",\"Tsym\":\""+Tsym+"\",\"exch\":\""+exch+"\",\"Ttranstype\":\""+"B"+"\",\"Ret\":\""+Ret+"\",\"prctyp\":\""+prctyp+"\",\"qty\":\""+qty+"\",\"discqty\":\""+"0"+"\",\"MktPro\":\""+"NA"+"\",\"Price\":\""+"0"+"\",\"TrigPrice\":\""+"0"+"\",\"Pcode\":\""+Pcode+"\",\"AMO\":\""+AMO+"\"}";
         resp=algomojo.AMDispatcher(user_apikey, api_secret,"PlaceOrder",api_data);
         _TRACE("Strategy : "+ stgy_name +"  Symbol : "+  Tsym +"  "+ Interval(2)+"  Response : "+ resp +"  ChardId : "+ GetChartID() + " Latest Price : "+LastValue(C));
    }
    if( otype == "Sell")
    {
         algomojo=CreateObject("XLAMIBRIDGE.Main");
         api_data ="{\"stgy_name\":\""+stgy_name+"\",\"s_prdt_ali\":\""+s_prdt_ali+"\",\"Tsym\":\""+Tsym+"\",\"exch\":\""+exch+"\",\"Ttranstype\":\""+"S"+"\",\"Ret\":\""+Ret+"\",\"prctyp\":\""+prctyp+"\",\"qty\":\""+qty+"\",\"discqty\":\""+"0"+"\",\"MktPro\":\""+"NA"+"\",\"Price\":\""+"0"+"\",\"TrigPrice\":\""+"0"+"\",\"Pcode\":\""+Pcode+"\",\"AMO\":\""+AMO+"\"}";
         resp=algomojo.AMDispatcher(user_apikey, api_secret,"PlaceOrder",api_data);
         _TRACE("Strategy : "+ stgy_name +"  Symbol : "+  Tsym +"  "+ Interval(2)+"  Response : "+ resp +"  ChardId : "+ GetChartID() + " Latest Price : "+LastValue(C)); 
    }
    
}
else if(GetsecondNum() != otime)
{
     StaticVarSet(static_name + otime, 0);
}
}
_SECTION_END();


_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

Related Readings and Observations

Algomojo Automation and How to Fire Orders From Amibroker Scanners/ Exploration

$
0
0

This video tutorial explains how to send automated orders from Amibroker Scanners/Exploration feature. This will be generally helpful for traders who want to trade a basket of symbols (e.g 10 or 30 symbols) either positionally or intraday.

When one is dealing with Exploration-based modules one should very much aware of the configuration and it is a one-time setup and verification needs to be done. And rest of the daily routine work will be made simple once the initial settings are over. Here is the video tutorial on how to configure for Amibroker Scanner/Exploration based execution.

Related Readings and Observations

How to do Smart Order Execution in Amibroker – Automated Trading

$
0
0

This tutorial explains how to use the Algomojo Smart Execution Module to send orders based on the current position book. This will be most suitable for Long/Short Positional Traders who want to execute the first trade with the actual positions and every other trade is double the quantity based upon the open positions.

Related Readings and Observations

Chart Based Algo Trading using Algomojo

$
0
0

This webinar explores automated trading using algomojo platform. Algomojo brings more execution facilities and eases out the costing and pain of the algo traders who want to jumpstart with a better algo trading experience.

What is covered in this webinar?

1) How to Send Automated Orders from Amibroker and Tradingview Platform
2) Types of Trading Systems
3) How to Capture the Trade Logs from Chart Based Algo
4) How to Protect Algos from firing unwanted orders
5) Tips and Tricks while using Algomojo Platform

Bearish Option Strategy: Nifty Hedged Puts – Nov 2020 Series

$
0
0

Structurally Nov 2020 series is closing the long pending island gap reversal which is an investing reference. However, emotions are running high during the US presidential election event.

In-order to play the emotions one have to learn to trade against the crowded trading decisions. And the Crowd is long and getting too emotional.

In-Order to play against the crowded bets one can consider using slight ATM Puts hedged with x2 times of OTM Short calls. The thing could bring some cushion for traders to manage the theta decay in the Put Options.

Entry

Buy 1 lot of 12000PE (slight ATM Puts) – 26th Nov 2020 Expiry at 183.20/Lot

Hedge Protection

Sell 2 lot of 12100CE (OTM Calls) – 26th Nov 2020 Expiry at 206.10/Lot
Buy 2 lots of 12500CE (OTM Calls) – 26th Nov 2020 Expiry at 55.00/Lot

Total Margin Required for Hedged Position : Rs1,07.542

Nifty LTP : 12080

Strategy Breakeven Point: 12159
Exit on Nifty Closing the Monthly gap (i.e Nifty Futures testing 11600 levels)

Strategy Risk Level: Moderate Risk Level and Risk increases if Nifty starts moving above 12200 level.

Strategy Expectation : Liquidation towards 11600 levels in Nov 2020 series.

The strategy has protection up to 12150 levels. If Nifty goes beyond 12200 levels it requires exit on the hedge until then, No strategy adjustment is required.

How to Send Option Orders from Nifty Charts using Tradingview Platform?

$
0
0

Algomojo provides functionality to send option orders using PlaceFOOptionsOrder function. which can be used to send automated orders from Tradingview/Amibroker application to trigger ITM/ATM/OTM option orders.

Algomojo offers free API + Free Platform with No upfront fees,  no minimum turnover, no special terms and conditions, no clauses, no strings attached for the algomojo clients.

PlaceFOOptionsOrder API information

Here is the sample request and response example from the algomojo documentation.

# Here is a curl example
curl \
-X POST https://abapi.algomojo.com/1.0/PlaceFOOptionsOrder
-X POST https://tjapi.algomojo.com/1.0/PlaceFOOptionsOrder
-X POST https://zbapi.algomojo.com/1.0/PlaceFOOptionsOrder

                
To get characters you need to make a POST call to the following url :
https://abapi.algomojo.com/1.0/PlaceFOOptionsOrder https://tjapi.algomojo.com/1.0/PlaceFOOptionsOrder https://zbapi.algomojo.com/1.0/PlaceFOOptionsOrder



Request example :

{
  "api_key":"c1997d92a3bb556a67dca7d1446b7087",
  "api_secret":"5306433329e81ba41203653417063c71",
  "data":
    {
      "strg_name":"Options",
      "spot_sym":"NIFTY",
      "expiry_dt":"05NOV20",
      "opt_type":"PE",
      "Ttranstype":"B",
      "prctyp":"MKT",
      "qty":"75",
      "Price":"0",
      "TrigPrice":"0",
      "Pcode":"NRML",
      "strike_int":"50",
      "offset":"10"
    }
}

Response example :
{
    "NOrdNo": "200810000017432",
    "stat": "Ok"
}

In the previous tutorial, we learn how to send automated orders from tradingview platform. The same way one can send automated option orders from Tradingview Charts/Strategies.

Understanding the ATM/ITM/OTM options selection process

One can select the ATM/ITM/OTM strike price automatically by selecting the offset value as shown from the above API request information. For placing orders in ATM strikes one have to send the offset value to zero and if one needs to select lower strike price then negative offset needs to be used and positive offset for selecting higher strike price than the last traded price.

Below example explains the various offset values and how to ATM/ITM/OTM values are decided based on the offset parameter selection.

Tradingview Webhook

Tradingview supports webhook alerts from Tradingview Pro plan onwards. Webhook is a unique way of communicating in realtime from one application to another application. Webhooks are automatic. You don’t have to manually utilize them in order to make them work — once they’re set up, they run on their own.

Tradingview Webhook Alert Configuration

Here are the different webhook configuration settings for various type of orders. Note for bracket orders one need to send along with token id. Which will be discussed in the upcoming articles.

Webhook URL for placing Option orders (ATM/ITM/OTM orders)

Broker - Aliceblue 
https://abapi.algomojo.com/1.0/PlaceFOOptionsOrder

Broker - Tradejini
https://tjapi.algomojo.com/1.0/PlaceFOOptionsOrder

Broker - Zebu
https://zbapi.algomojo.com/1.0/PlaceFOOptionsOrder

Webhook Message Format – Sample PlaceFOOrder Example

{
  "api_key":"c1997d92a3bb556a67dca7d1446b7087",
  "api_secret":"5306433329e81ba41203653417063c71",
  "data":
    {
      "strg_name":"Options",
      "spot_sym":"NIFTY",
      "expiry_dt":"05NOV20",
      "opt_type":"PE",
      "Ttranstype":"B",
      "prctyp":"MKT",
      "qty":"75",
      "Price":"0",
      "TrigPrice":"0",
      "Pcode":"NRML",
      "strike_int":"50",
      "offset":"0"
    }
}

Note : One can send orders from Nifty Spot/Nifty Futures and also the ATM/ITM/OTM calculations will be done at the Algomojo end and not at the Tradingview side.

Here order is send for ATM PE for 05th Nov 2020 contract and the execution happened immediately at 12100PE when the Nifty spot price is around 12085 levels.


Code Snippet: Tradingview Pinescript Code for Open Range Breakout

$
0
0

Here is the Tradingview Pinescript code for open range breakout. It a prototype code to build your own indicator/trading system on top of open range breakout levels. Traders can now build backtestable trading systems on top this pinescript code snippet.

Open Range Breakout is a simple strategy that monitors the first 5min / 15min / 15min / 30min / 60min range from the start of the market. From the opening high range and low range is calculated for the specified timeframe. Most of the Pinescript code found on the internet is either buggy or not suitable for building back-testable trading systems.

To solve this issue we are releasing a prototype for ORB – Open Range Breakout Levels.

By default, the code uses a 60min range breakout from the market open. However, Parameters can be changed from the Parameter window. Currently Open Range breakout options are available for various timeframes.

Note : If your charting timeframe is 5min then higher resolution can be accessed from the Resolution Input section. And Ensure while setting the Breakout Timings are set from the start of the exchange timings and ends at the resolution timings. For example if in case you want to monitor first 15min breakout levels then Resolution should be set to 15min and Breakout Timings to 0915 – 0930 range

However, if someone needs a customized ORB range then code customization needs to be done accordingly on top of the code.

Code will start plotting the Open Range values only if the Open Range timeframe is completed else nothing will be plotted. For example for an Open Range value of 60min. The plot will start only from 10:15:00 onwards for NSE Futures instruments and will start from 11:00:00 onwards for MCX futures instruments automatically.

Alerts are also added to set automated alerts and can be later triggered into orders. If in case you are new to Automated Orders in Tradingview check out this tutorial

Tradingview Pinescript Code – Open Range Breakout with Alerts

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © marketcalls_in
// Founder - Marketcalls (www.marketcalls.in)
// Co-Founder - Algomojo (www.algomojo.com)

//@version=4
study("Open Range Breakout",overlay=true)

tf = input(title="Resolution",type = input.resolution,defval = "60")  //which timeframe you want to move
session = input(title="Breakout Timings",defval="0915-1015", type=input.session)
linew = input(title="Line Width",type = input.integer, defval=2,minval=1,maxval=5)


//is the market trading in between the session timings? If yes then it returns true
Barsinsession(session) => time(tf,session) != 0  //single line function

Insession = Barsinsession(session) ? 1 : 0
endofsession = Insession == 0 and Insession[1] == 1  //end of the session if it is happening -> returns ture

//high value and low value from 60min timeframe charts
hi = security(syminfo.tickerid,tf,high)  
lo = security(syminfo.tickerid,tf,low)


orbh = valuewhen(endofsession,hi,0)  //first time computation
orbl = valuewhen(endofsession,lo,0)

orbh := Barsinsession(session) ? na : orbh   //rewriting the value storing a different value
orbl := Barsinsession(session) ? na : orbl   //rewriting the value storing a different value


Buy = crossover(high,orbh)
Short = crossunder(low,orbl)

//flip
Buycontinue = barssince(Buy) < barssince(Short)
Shortcontinue = barssince(Short) < barssince(Buy)

newday = dayofmonth != dayofmonth[1]


var isLong = false
var isShort = false

//exrem
Buy := not isLong and Buy
Short := not isShort and Short

if Buy
    isLong := true
    isShort := false

if Short
    isLong := false
    isShort := true
    
if newday[1]
    isLong := false
    isShort := false
    
//indicates the buy or sell signal
plotshape(Buy,style=shape.labelup,location = location.belowbar,color=color.green,title = "Buy",text="Buy",textcolor=color.white)
plotshape(Short,style=shape.labeldown,location = location.abovebar,color=color.red,title = "Sell",text="Sell",textcolor=color.white)


alertcondition(Buy, title='Buy Alert', message='Buy Signal!')
alertcondition(Short, title='Short Alert', message='Short Signal!')

plot(orbh,color=color.red,style=plot.style_circles,linewidth=linew)
plot(orbl,color=color.lime,style=plot.style_circles,linewidth=linew)

In the next pine script tutorial will catch you with more interesting coding features.

Ultimate Guide to Momentum Trading

$
0
0

This a brief video guide for the momentum traders which explains right from what is momentum trading,how momentum trading is related to the diffusion innovation model, How to identify momentum, Different types of momentum

This video tutorial also focus on couple of momentum trading strategies and how one should follow their own strategy. How backtesting plays a major role in systematic trading. How momentum traders can take advantage of fat tails.

Algomojo Now Supports Multi-Client Trading with Amibroker, Metatrader, NinjaTrader, Python, Tradingview & Excel Based Tools

$
0
0
Photo by Stephen Leonardi on Unsplash

I am excited to announce the most demanded feature from Algomojo clients.

Yes, from now onwards Multi-Account Execution from trading tools like Amibroker, Metatrader 4 and Metatrader 5, Ninjatrader 7, Ninjatrader 8, Excel,Tradingview is now possible at zero additional cost for all the algomojo trading clients.

Traders can have multiple trading accounts with multiple partner brokers (Aliceblue, Enrich, Tradejini, Zebu) of Algomojo and enjoy both single client and multiclient execution at no additional cost. And more brokers are likely to onboard in the very short run.

If in case you are new to Algomojo then kick start with this Introductory session

Algomojo Metatrader 4 & 5 Bridges are designed in such a way to send trading orders from both mql4 and mql5 indicators and expert advisors

Trading Bridge is designed to supports both single client vs Multi-Client Execution, One can use the Algomojo python library to send automated orders to both individual and multi-client accounts.

To install the latest Algomojo Python Library from your command prompt type

pip Install Algomojo

More Functional details about the Algomojo Python Library here

Features Supported By Algomojo Multi Client Execution Bridges & Libraries

1)Place Market Orders/Limit Orders/ SL-Limit / SL-MKT Orders
2)Place ATM/ITM/OTM Option Orders
3)Place Bracket Orders/Cover Orders
4)Modify Orders
5)Cancel Orders
6)Exit Bracket Orders
7)Exit Cover Orders
8)Place Multi Orders (Basket Orders)
9)Place Multi Bracket Orders (Bracket Orders)
10)Squareoff Orders
11)Convert Orders
12)Retrieve Funds/Margin Details
13)Get OrderBook
14)Get TradeBook
15)Get OrderHistory
16)Get OpenPosition
17)Get Token ID for Placing Bracket Orders

All the above features can be retieved via trading platforms like Amibroker, Metatrader4, Metatrader 5, Excel, Ninjatrader 7, Ninjatrader 8, Python and any trading programs supporting algomojo http-rest API.

If you are a custom program user and need to develop trading solutions on top of HTTP-Rest API then try out the in-depth algomojo API documentation

Multi Client Order Placing from Amibroker

Multi Client Order Placement from Metatrader 4 Expert Advisor

Multi-Client Order Placement from Metatrader 5 Expert Advisor

In case you want to access the automated trading facilities offered by algomojo then open a trading account with Algomojo and enjoy unlimited access with Free API and Free Algo Trading Platform.

Hold your breath, more sophisticated, and also Simple Algo Execution tutorials lined up. Stay tuned. The next tutorial will explore the Trading Bridges one by one right from how to setup and how to make use of those facilities provided by Algomojo.

Happy Diwali wishes to you all
Team Algomojo

Authorized Data Vendors Vs Illegal Data Vendors Explained

$
0
0

This video tutorial discusses Data Vendors, Data Types, Data Configuration, and How to use the Data Manager with trading tools like Amibroker and the basic difference between Authorized Data Vendors Vs Illegal Data Vendors

Interested in Designing your own trading systems?
If you are interested in creating your own trading indicators, scanners, trading strategies and want to automated your codes?

Then here are the 75+ hours of Mentoring Program Starting from 23rd Nov onwards. Session will be conducted during the evenings 6p.m – 9p.m

For Complete Agenda Visit

QuantZilla – 75+ hours of Live Mentoring Program for Systematic Trading

What is Covered in this video tutorial

1)Who Should use Amibroker?
2)Different Types of Data
3)Authorized Data Vendors Vs Unauthorized Data Vendors
4)About Data Managers
5)How to Configure the Amibroker Database
6)Continous Vs Non-Continous Contracts
7)Importance of Authorized Data vendors
8)How to understand the different data vendors plans
9)How to check the Authority of the data vendors

Code Snippet – Simple Intraday Trading System with Target and Stoploss – Tradingview Pinescript

$
0
0

Thought of implementing a simple intraday trading system with stoploss and target controls with time-based entry and exit controls. Traders can use this code as a prototype to design their own intraday trading strategy

Tradingview Pinescript brings more interesting way of implementing pure intraday trading system with target and stoploss.

Here is a simple Intraday Trading System Module. Sort of a Coding Snippet to create your own intraday trading system with the following signals

1)Buy Signal
2)Sell Signal
3)Stop Exit
4)Target Exit
5)Square.Off Exit

Note: It is not a Tradingview strategy but more of visual indications. Kindly use the module to build your strategy on top of this code. For simplicity purpose explained with EMA crossover strategy.

Intraday Trading System – Pinescript Module (Visual Stop and Target Levels )

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © marketcalls_in
//Coded by Rajandran R (Founder - Marketcalls/Co-Founder - Algomojo)

//@version=4
study("Simple Intraday Trading System",overlay=true)

ema1 = input(title="Fast EMA",type = input.integer, defval=5,minval=1,maxval=200)
ema2 = input(title="Slow EMA",type = input.integer, defval=10,minval=1,maxval=200)
TradeTime = input(title="Trade Timings",defval="0930-1500", type=input.session)
SqoffTime = input(title="Squareoff Timings",defval="1515-1530", type=input.session)
stop = input(title="Stoploss (Points)",type = input.integer, defval=30,minval=1,maxval=1000,step=0.05)
target = input(title="Target (Points)",type = input.integer, defval=20,minval=1,maxval=1000,step=0.05)
displayema = input(title="Display EMA",type=input.bool,defval=true)

Barsinsession(TradeTime) => time(timeframe.period,TradeTime) != 0



Insession = Barsinsession(TradeTime) ? 1 : 0
endofsession = Insession == 0 and Insession[1] == 1  


Sqsession = Barsinsession(SqoffTime) ? 1 : 0
SqTime = Sqsession == 1 and Sqsession[1] ==0



Buy = crossover(ema(close,ema1),ema(close,ema2)) and Insession
Sell = (crossunder(ema(close,ema1),ema(close,ema2)) and Insession) or SqTime


BuyPrice = valuewhen(Buy,close,0)


targetprice = BuyPrice + target
stopprice = BuyPrice - stop

emacrossexit = crossunder(ema(close,20),ema(close,50))
Targethit = crossover(high,targetprice)
Stophit = crossunder(low,stopprice)

Sell := Sell or Targethit or Stophit

exitprice = valuewhen(emacrossexit or SqTime,close,0)
targetexitprice = valuewhen(Targethit,targetprice,0)
stopexitprice = valuewhen(Stophit,stopprice,0)


newday = dayofmonth != dayofmonth[1]

var isLong = false
var isSell = false

//Removing Excessive Signals
Buy := not isLong and Buy
Sell := not isSell and Sell

if Buy
    isLong := true
    isSell := false

if Sell
    isLong := false
    isSell := true
    
    
//flip
buycontinue = barssince(Buy) < barssince(Sell)
sellcontinue = barssince(Sell) < barssince(Buy)



plot(buycontinue? targetprice : na,color=color.blue,style=plot.style_circles,linewidth=1 )
plot(buycontinue? stopprice : na,color=color.red,style=plot.style_circles,linewidth=1 )



plotshape(Buy,style=shape.labelup,location = location.belowbar,color=color.green,title = "Buy",text="Buy",textcolor=color.white)

plotshape(Sell and not SqTime and not Targethit and not Stophit,style=shape.labeldown,location = location.abovebar,color=color.red,title = "Sell",text="Sell",textcolor=color.white)
plotshape(Sell and SqTime and not Targethit and not Stophit,style=shape.labeldown,location = location.abovebar,color=color.orange,title = "Squareoff.Exit",text="Squareoff.Exit ",textcolor=color.white)

plotshape(Sell and not SqTime and Targethit and not Stophit,style=shape.labeldown,location = location.abovebar,color=color.blue,title = "Sell",text="Target.Exit",textcolor=color.white)
plotshape(Sell and not SqTime and not Targethit and Stophit,style=shape.labeldown,location = location.abovebar,color=color.red,title = "Squareoff.Exit",text="Stop.Exit",textcolor=color.white)



plot(displayema ? ema(close,ema1) : na,color=color.aqua,style=plot.style_line,linewidth=1)
plot(displayema ? ema(close,ema2) : na,color=color.lime,style=plot.style_line,linewidth=1)

Viewing all 2070 articles
Browse latest View live