trading

Stock Trading script/language for .NET?

*爱你&永不变心* 提交于 2020-01-03 02:30:15
问题 Is there a component I can use to create a stock trading/backtesting application in .NET? I am looking for something similar to TradeScript from ModulusFE: http://www.modulusfe.com/tradescript/ 回答1: It's not as easy as the guy above tries to make it sound. You're best to use TradeScript, MQL4, EasyLanguage or even MatLab - there are some back testing add-ons for MatLab. You do NOT want to roll your own. There's a lot more to it than meets the eye. 回答2: I don't know if I understand you

Why is my EA not moving my position to breakeven?

三世轮回 提交于 2019-12-23 03:24:06
问题 I'm attempting to modify my market orders to breakeven the position when the position get 100 pips to the good. This also accounts for the StopLevels which are around 20-30 pips for my broker. It checks the param's via a " for(){...} loop" function The MagicNumber is the timeframe number for the chart it is on (i.e. 240 =4H, 60 =1H) I don't set a TakeProfit price & initially no StopLoss price. The EA is not adding a SL to be equal to the opening price when the trade reaches 100 pip in profit

Convert tick data to 1 minute OHLC (Open, High, Low, Close) in JavaScript?

余生颓废 提交于 2019-12-13 10:44:50
问题 Similar to create an OHLC data from Date, time, price using Javascript, how does one take the theory of converting basic trade data to OHLC (or Open, High, Low, Close) and apply it to generating 1 minute OHLC? Beside that, I also have problem adapting epoch timestamp to ISODate with the provided code. var data = [{ "tid": 283945, "date": 2018-08-02T04:24:53Z, "amount": "0.08180000", "price": "501.30" }, { "tid": 283947, "date": 2018-08-02T04:24:53Z, "amount": "0.06110000", "price": "490.66" }

When attempting to merge multiple dataframes, how to resolve “ValueError: If using all scalar values, you must pass an index”

时光怂恿深爱的人放手 提交于 2019-12-13 03:23:41
问题 I am trying to fetch and store all historical 1 minute candle data from Bitfinex exchange. When attempting to append new dataframes to an existing one, I get this error "ValueError: If using all scalar values, you must pass an index", despite passing an index in constructor. Have tried the solution here - to pass an index in the DataFrame constructor: Constructing pandas DataFrame from values in variables gives "ValueError: If using all scalar values, you must pass an index". Its probably

NotImplementedError() what does this mean, event profiler pyalgotrade

跟風遠走 提交于 2019-12-12 23:00:52
问题 I'm trying to run pyalgotrade's event profiler. I'm using custom data, it works when I run it with the default stratergy/predicate 'BuyOnGap' however when I try and run it with a simple custom strategy it throw the error: Traceback (most recent call last): File "C:\Users\David\Desktop\Python\Coursera\Computational Finance\Week2\PyAlgoTrade\Bitfinex\FCT\FCT_single_event_test.py", line 43, in <module> main(True) File "C:\Users\David\Desktop\Python\Coursera\Computational Finance\Week2

Oandapy: Expecting property name enclosed in double quotes

ⅰ亾dé卋堺 提交于 2019-12-11 15:56:49
问题 I'm trying to use algo-trading as described in this tutorial: https://www.oreilly.com/learning/algorithmic-trading-in-less-than-100-lines-of-python-code class MomentumTrader(opy.Streamer): def __init__(self, momentum, *args, **kwargs): opy.Streamer.__init__(self, *args, **kwargs) self.ticks = 0 self.position = 0 self.df = pd.DataFrame() self.momentum = momentum self.units = 100000 def create_order(self, side, units): order = oanda.create_order(config["oanda"]["account_id"], instrument="EUR

MQL4 Can you get the trade volume from the One Click Panel?

北城余情 提交于 2019-12-11 14:47:08
问题 Does anyone know if and how you can get the trade volume from the One Click Trade panel on the current chart? I'm putting together some quick trade scripts and would be great to pull the current trade volume or lot size from the one click panel. Thanks in advance 回答1: IMHO no The recent 24 months of Metatrader 4 ( re-inventing ) product updates have brought a few teasing elements ( One-Click-Trading[TM] ( OCT ), or Depth-Of-Market ( DOM ), New-MQL4 ( nMQL4 ) ). The bad news, nevertheless, is

Warning in quantstrat

五迷三道 提交于 2019-12-11 12:11:51
问题 Here is my code: library(quantstrat) suppressWarnings(try(rm(list=ls(FinancialInstrument:::.instrument),pos=FinancialInstrument:::.instrument),silent=TRUE)) currency("EUR") stock("ATX",currency="EUR",multiplier=1) ls(envir=FinancialInstrument:::.instrument) ls(all=T) initDate <- '1999-01-04' startDate <- '1999-01-05' endDate <- '2014-09-25' initEq <- 1e6 Sys.setenv(TZ="UTC") ## ----echo=FALSE,results='hide'------------------------------------------- if(file.exists("ATX.RData")) { load("ATX

How to Write a Custom Rule Function for Quantstrat in R - Replace trailing stop order with stoplimit with ruleOrderProc

我是研究僧i 提交于 2019-12-11 06:47:23
问题 My goal is to use the rule that I outline below to generate a signal to place a new 'stoplimit' order that replaces my trailing stop. I don't want my stop to trail indefinitely, only until it reaches my breakeven price (if this can be achieved somehow already, please let me know). I am hoping to write a custom rule in quantstrat with the following objective: If today's "Close" minus (-) the threshold value (a scalar) on the timestamp of trade open, is greater than (>) the "Open" price on

Commodity Futures Hierarchical Data Structure

荒凉一梦 提交于 2019-12-10 18:48:55
问题 I for the life of me cant seem to get the structure I want and have it function properly, so in a fit of rage I come to you guys. Setup: I have a Directory called Futures_Contracts and inside is about 30 folders all named with the underlying asset, and finally inside the 6 nearest expiration contracts in csv format. Each csv is identical in format and contains Date,O,H,L,C,V,OI,Expiration Month. Note: O H L C V OI is open, high, low, close, volume, open interest (for those not familiar) also