Is there a way to get SUPERTREND buy/sell signals?

rajeshreddyrr@gmail.com
Hi,

I am planning to automate my strategy based on supertrend signals. Is there a way to capture KITE's SUPERTREND BUY/SELL signals through API and place orders.

If this is not possible, do u offer any other solution for this.

Rajesh
  • chaudhariapurva
    chaudhariapurva edited October 2016
    the code is in c# but you should get it
    if ((DateTime.Now.TimeOfDay > DataHelpers.RoundUp(starttym, TimeSpan.FromMinutes(checktime))))
    //|| !data)
    {
    starttym = DateTime.Now.TimeOfDay;
    priceprev = price;
    price = Convert.ToDouble(temp.Ltp)/100;
    if (!data)
    {
    priceprev = price;
    data = true;
    }
    JToken qutarr = xquote.GetQuote(ticker, "minute", true, noofdaybak);
    var min = (double) qutarr[(int) DataHelpers.Ohlc.Low];
    var max = (double) qutarr[(int) DataHelpers.Ohlc.High];
    double pivot = (min + max)/2;
    double atr = xindicator.Atr(periods, "minute", ticker, true, noofdaybak);
    double uppertmp = pivot + multiplier*atr;
    double lowertmp = pivot - multiplier*atr;

    if ((uppertmp < upper) || (priceprev > upper))
    {
    upper = uppertmp;
    }
    if ((lowertmp > lower) || (priceprev < lower))
    {
    lower = lowertmp;
    }
    Console.WriteLine(scriptname);
    Console.WriteLine("upper" + upper);
    Console.WriteLine("lower" + lower);
    Console.WriteLine(DateTime.Now.TimeOfDay);
    }
  • Mukesh_Kumar
    "xindicator.atr"..is there any function in vba to get ATR and ADX?
  • amit_aggrawal321
    Apurva, Can I get complete C# solution for the above program that you mentioned?
Sign In or Register to comment.