trading

can't access value from function in pine editor

只谈情不闲聊 提交于 2020-11-29 19:10:36
问题 I am trying to test out an RSI-14 DI reversal strategy, but am unable to access the DI+ or DI- (variables are "plus" and "minus") from the function that they are in. Any ideas on how to access them? Here is the code: //@version=4 strategy("RSI-14, DI+, DI- Reversal Strategy", overlay=false) /// DI+ DI- Code /// /// DI+ is the variable called "plus" and DI- is the variable called "minus" adxlen = input(14, title="ADX Smoothing") dilen = input(14, title="DI Length") dirmov(len) => up = change

How to plot the result from highest defining the number of bars with barssince

自作多情 提交于 2020-06-18 04:48:12
问题 Try to plot the value of the highest bars between current bar and the last cross of ema(50) and ema(200) using barssince(cross(ema50,ema200)) . The function highest() wants an integer and the Barssince gives a series integer . All variants getting the error that pine connot compile with error: line 4: Cannot call `highest` with arguments (series[integer]); available overloads: highest(series, integer) => series; highest(integer) => series Script. //@version=3 study("My Script") o = 0 o :=

How to plot the result from highest defining the number of bars with barssince

蓝咒 提交于 2020-06-18 04:47:10
问题 Try to plot the value of the highest bars between current bar and the last cross of ema(50) and ema(200) using barssince(cross(ema50,ema200)) . The function highest() wants an integer and the Barssince gives a series integer . All variants getting the error that pine connot compile with error: line 4: Cannot call `highest` with arguments (series[integer]); available overloads: highest(series, integer) => series; highest(integer) => series Script. //@version=3 study("My Script") o = 0 o :=

Python: Real-Time Streaming Data [closed]

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-22 12:45:31
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I am trying to capture real-time streaming financial time data via Python. I want to initially store the information in a database and then at a later date further develop a program to analyze and make trading decisions based on this data. It would be nice to also be able to

How to apply the Hurst Exponent in Python in a rolling window

坚强是说给别人听的谎言 提交于 2020-01-13 18:55:09
问题 I am trying to apply the Hurst Exponent on SPY closing prices on a rolling window. The below code (which I got from here: https://www.quantstart.com/articles/Basics-of-Statistical-Mean-Reversion-Testing) works well if I apply it on the closing prices column. However this gives me a static value. I would like to apply the Hurst Exponent on a rolling window considering the last 200 closing prices. My objective is to get a column in which the Hurst Exponent is updated in each row considering the

Python code issues with Oanda API Rest V20 - Unable to run automatic code

醉酒当歌 提交于 2020-01-06 08:39:14
问题 This is my first post on here. I usually find what i'm looking for when encountering issues with some codes. This one is different though. I am trying to run an automatic trading algorithm but the stuff I found online to help me with writing this code is either outdated or i guess i'm using it wrong. Thus, here is my code. The first part works perfectly fine. Trouble comes when arriving at the 'myclass' section. CODE : import json import oandapyV20 from oandapyV20 import API # the client

eBay Trading API - calling structure in Delphi

感情迁移 提交于 2020-01-06 05:31:07
问题 I am trying to call eBay API through Delphi. After long time searching through Google and StackOverflow, I can get "GeteBayTime" (Shopping API) and "findItemsByKeywords" (Finding API) work properly now. When I started to test with Trading API, I have no idea where and how to insert seller's account info (userid and password). My first program for trading API is shown below and it is started with API call "GetSellingManagerSoldListings". Can any one show me some clue to make Trading API work?