What is Limit Order?
Maximum Price you could afford to pay to buy a Share (or)
Minimum Price at which you are ready to sell a share

What is Limit Buy Order?
For example, a buy limit order can be put in for $2.40 when a stock is
trading at $2.45. If the price dips to $2.40, the order is automatically executed.

What is Sell Limit Order?
For example, a sell limit order can be put in for $2.40 when a stock is
trading at $2.35. If the price dips to $2.40, the order is automatically executed.

For example, a sell limit order can be put in for $2.40 when a stock is
trading at $2.35. If the price dips to $2.40, the order is automatically executed.

What is Stop-Limit Order?
A stop-limit order is an order placed with a broker that combines the features of a stop order
with those of a limit order. A stop-limit order will be executed at a specified price, or better, after a
given stop price has been reached. Once the stop price is reached, the stop-limit order becomes a limit
order to buy or sell at the limit price or better.

A stop-limit order requires the setting of two price points. The first point initiates the start of
the specified action, referred to as the stop, while the second represents the outside of the
investor’s target price, referred to as the limit. A timeframe must also be set,
during which the stop-limit order is considered executable.

For example, assume that ABC Inc. is trading at $40 and an investor wants to buy the stock once it begins to show some serious upward momentum. The investor has put in a stop-limit order to buy with the stop price at $45 and the limit price at $46. If the price of ABC Inc. moves above $45 stop price, the order is activated and turns into a limit order. As long as the order can be filled under $46, which is the limit price, the trade will be filled. If the stock gaps above $46, the order will not be filled.

import com.eviware.soapui.impl.wsdl.teststeps.*

def list = []
list.add(jsessionid)
def headers = testStep.testRequest.requestHeaders
headers["Cookie"] = list
testStep.testRequest.requestHeaders = headers
log.info testStep.testRequest.requestHeaders["Cookie"]
package com.mugil.first
import jxl.*
import jxl.write.*


class ExcelUtils {
	public static void main(String[] args)
	{
		writeExcel()
		readExcel()
	}
	
	static def writeExcel()
	{
		WritableWorkbook workbook = Workbook.createWorkbook(new File("d:\\output.xls"))
		WritableSheet sheet = workbook.createSheet("Worksheet1", 0)		 
		
		for(int i=0;i<3;i++)
		{
			for(int j=0;j<5;j++)
			{
				Label label = new Label(i, j, i+","+j);
				sheet.addCell(label);
			}
		}		
		
		workbook.write()
		workbook.close()	
		
	}
	
	static def readExcel()
	{
		Workbook workbook1 = Workbook.getWorkbook(new File("d:\\output.xls"))
		Sheet sheet1 = workbook1.getSheet(0)
		Cell a1 = sheet1.getCell(0,2) 
		Cell b2 = sheet1.getCell(2,2) 
		Cell c2 = sheet1.getCell(2,1)
		
		println a1.getContents();
		println b2.getContents();
		println c2.getContents();		
		
		workbook1.close()
	}
}

What def Keyword Does?
def is a replacement for a type name. In variable definitions it is used to indicate that you don’t care about the type. In variable definitions it is mandatory to either provide a type name explicitly or to use “def” in replacement. This is needed to make variable definitions detectable for the Groovy parser.You can think of def as an alias of Object and you will understand it in an instant.

def name = "Stephanie"
println name.toUpperCase() // no cast required

while you would need an explicit cast in the Java version

Object name = "Stephanie";
System.out.println(((String) name).toUpperCase());

Omitting the “def” keyword puts the variable in the bindings for the current script and groovy treats it (mostly) like a globally scoped variable:

x = 1
assert x == 1
assert this.binding.getVariable("x") == 1

Using the def keyword instead does not put the variable in the scripts bindings:

def y = 2
assert y == 2
try {
    this.binding.getVariable("y") 
} catch (groovy.lang.MissingPropertyException e) {
    println "error caught"
} 

Prints: “error caught”

If you define a method in your script, it won’t have access to the variables that are created with “def” in the body of the main script as they aren’t in scope:

x = 1
def y = 2

public bar() {
    assert x == 1

    try {
        assert y == 2
    } catch (groovy.lang.MissingPropertyException e) {
        println "error caught"
    }
}

bar()

prints “error caught”

The “y” variable isn’t in scope inside the function. “x” is in scope as groovy will check the bindings of the current script for the variable.

JARs to be added

  • poi-3.8.jar
  • poi-examples-3.8.jar
  • poi-excelant-3.8.jar
  • poi-ooxml-3.8.jar
  • poi-ooxml-schemas-3.8.jar
  • poi-scratchpad-3.8.jar
  • dom4j-1.6.1.jar

Reading Excel Sheet

import org.apache.poi.ss.usermodel.*;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.xssf.usermodel.*;
import org.apache.poi.ss.util.*;
import org.apache.poi.ss.usermodel.*;
import java.io.*;
 
class ExcelReader {
  
  def readData() {
        def path = "D:\\Test.xlsx";
        InputStream inputStream = new FileInputStream(path);
        Workbook workbook = WorkbookFactory.create(inputStream);
        Sheet sheet = workbook.getSheetAt(0);
                      
        Iterator rowIterator = sheet.rowIterator();
        rowIterator.next()
        Row row;                       
        def rowsData = []
        while(rowIterator.hasNext()) {
             row = rowIterator.next()
             def rowIndex = row.getRowNum()
             def colIndex;
             def rowData = []
             for (Cell cell : row) {
                 colIndex = cell.getColumnIndex()
                  rowData[colIndex] = cell.getRichStringCellValue().getString();
             }                    
             rowsData << rowData
         }
         rowsData
  }
 }
 
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def myTestCase = context.testCase
 
ExcelReader excelReader = new ExcelReader();
List rows = excelReader.readData();
def d = []
Iterator i = rows.iterator();
while( i.hasNext()){
         d = i.next();
         myTestCase.setPropertyValue("From", d[0])
         myTestCase.setPropertyValue("To", d[1])       
         testRunner.runTestStepByName( "ConversionRate")
}

How to view Budget

  1. Growth
  2. Development
  3. Inflation(Stability in Economy)
  4. Immediate Challenges

Based on how well the above things are promised and how feasible the solutions are for the above
we can rate the budget

The motive of Government Budget is to increase GDP.It is like when the whole economy goes up the GDP goes up. When the Cake that should be shared is large everyone gets a big piece out of it.When the economy grows, GDP grows and cash flow among people would grow.

In our GDP 2 out of 3 comes from Service sector and foreign clients contribute a huge part of it.

GDP can be measured like one below

GDP = C + I + G + (x-m)

G – Government Stimulus to promote economy Growth
X – Export
I – Private Investment
C – Consumption Expenditure(Affected due to demonetization at present)
m – Imports

As per the current Situation

  • There is No Major Government Stimulus
  • Import is more then Export.So x-m is Negative
  • Private Investment is Lethargic because of Trump
  • Consumption is low because of demonetization

Government Stimulus helps in Capital Expenditure. Capital Expenditure is the One Incurred by the Company during initial stages of establishment. Capital Expenditure are very less compared to Revenue Expenditure. Revenue Expenditure helps in daily process or functioning of company like purchase of raw materials to making it finished goods.

Difference Between Deficit, Revenue, Expenditure and Relationship