Comments (6)
Hi. The most updated version is v3.1. Some of your problem should be fixed in this version. Please pull the branch and try to see if the problem is fixed.
from trady.
Thanks but I got 3.1 and the the same thing happens.
First error : 'Object reference not set to an instance of an object.'
in Runner.cs
private void SellAsset(IIndexedOhlcv indexedCandle, decimal premium, IDictionary<IEnumerable<IOhlcv>, decimal> assetCashMap, IList<Transaction> transactions)
{
if (assetCashMap.TryGetValue(indexedCandle.BackingList, out _))
{
var nextIOhlcvData = indexedCandle.Next;
var lastTransaction = transactions.LastOrDefault(t => t.IOhlcvDatas.Equals(indexedCandle.BackingList));
decimal cashIn = nextIOhlcvData.Open * lastTransaction.Quantity - premium;
decimal plRatio = (cashIn - lastTransaction.AbsoluteCashFlow) / lastTransaction.AbsoluteCashFlow;
assetCashMap[indexedCandle.BackingList] += cashIn;
transactions.Add(new Transaction(indexedCandle.BackingList, nextIOhlcvData.Index, nextIOhlcvData.DateTime, TransactionType.Sell, lastTransaction.Quantity, cashIn));
OnSold?.Invoke(indexedCandle.BackingList, nextIOhlcvData.Index, nextIOhlcvData.DateTime, nextIOhlcvData.Open, lastTransaction.Quantity, cashIn, assetCashMap[indexedCandle.BackingList], plRatio);
}
}
Error is thrown on the line
decimal cashIn = nextIOhlcvData.Open * lastTransaction.Quantity - premium;
In the second sample above, I am getting new errors:
'IsEma10BullishCrossEma30' is not a member of 'IIndexedOhlcv'
'IsEma10Rising' is not a member of 'IIndexedOhlcv'.
'IsEma10BearishCrossEma30' is not a member of 'IIndexedOhlcv'
'IsEma10Dropping' is not a member of 'IIndexedOhlcv'
Thanks
from trady.
Again if there were a simple project where these samples were working, we could use that to solve our own problems.
from trady.
@Transigent I don't see those 4 methods anywhere in the project.
IsEma10BullishCrossEma30
IsEma10Rising
IsEma10BearishCrossEma30
IsEma10Dropping
Can you confirm once again you were working on v3.1? Are these custom indicators or methods you created for this library?
I got your first example working fine in a unit test.
from trady.
@Transigent I just noticed that those four methods were an example that IppKarl created for the README file. But they are not actual methods in the library. FYI. Hope that answers your question.
from trady.
The issue is no longer active, closed.
from trady.
Related Issues (20)
- Transforming Data issue HOT 1
- Not getting expected CCI values HOT 3
- update problem HOT 3
- Kst indicator
- commodity channe lindex incorrect value
- Minute to hour transformation: failure HOT 3
- Rule bug?
- Performance when computing single indexes on RSI with large datasets HOT 2
- How to correctly call and compute indicators HOT 1
- Library incompatible w/ newer versions of CsvHelper HOT 6
- Volume Profile Indicator HOT 1
- Takes Too Long To Get Data From Importer HOT 1
- Need Help With Custom Importer HOT 11
- Indicator on Indicator 'TInput TOutput not matched' HOT 1
- TransformToCandles<Daily> Return repeated days
- Trady for crypto - Node.js
- AccumulationDistributionLine<TInput,TOutput> constructor is protected and cannot be instanciated!
- Performance issues with 2000 candles & Backtesting
- Error occured using trade
- How to import trades
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trady.