This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@version=3 | |
study(title="EMA and SMA Spread", shorttitle="EMASMASPREAD", overlay=false) | |
// Parameters | |
param_buy_value_conservative = input(0.1) | |
param_buy_value_moderate = input(0.5) | |
param_buy_value_aggresive = input(0.25) | |
param_ema_fast = input(5) | |
param_ema_slow = input(20) | |
param_sma_fast = input(5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Standalone test class that sets up a basic API that supports both JSON and XML. It is a single class setup so | |
that it is easy to follow. | |
Some quick pointers: | |
- If a multi line docstring is present in any function, it will be displayed in the Swagger UI as | |
"Implementation Notes". Use the Markdown syntax to format these notes, see | |
https://daringfireball.net/projects/markdown/syntax. | |
- Namespaces allow the API operations to be split into separate files, each defining a part of the API with a | |
different URL prefix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, Blueprint, url_for, jsonify | |
from flask_restplus import Api, Resource | |
from flask_marshmallow import Marshmallow, base_fields | |
from marshmallow import post_dump | |
# Setup Flask app | |
url_prefix = '/api/v4' | |
doc = '/apidoc/' | |
app = Flask(__name__) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.nidkil.jsontest | |
import org.json4s.{Formats, DefaultFormats} | |
import org.scalatra._ | |
import org.scalatra.json._ | |
import scalate.ScalateSupport | |
class JsonTestServlet extends ScalatraServlet with JacksonJsonSupport { | |
protected implicit val jsonFormats: Formats = DefaultFormats |