Pinescript code give "no data" on tradingview or gives cant find a certain function error - trading

this is quite new to me, so I've been trying to make it work for the past few days, but keep getting errors.
I'm trying to create a strategy code for several indicator, but get "Could not find function or function reference 'sma'" error or it compiles perfectly but get no data on the overview pane...
I decided to try the most basic code to see what happens:
strategy("Simple Moving Average Strategy", overlay=true)
// Define the moving average
ma = sma(close, 20)
// Buy signal
strategy.entry("Buy", strategy.long, when=crossover(close, ma))
// Sell signal
strategy.exit("Sell", when=crossunder(close, ma))
This yields no data.
can someone please assist?
also, if you guys can explain why I get "Could not find function or function reference 'sma'" (or other functions) eventhough the rest of the code is just fine, that would be great.
Thanks!
Tried reducing the code to its basics, to pinpoint the error.

Related

Create ML - Object Detection Training - Unexpected Error

I am trying to create an Object Detection model with CreateML.
But no matter what I do, every time I press "Train" I get the message "Unexpected Error". But without any further information.
Here is the annotations.json data:
[{"image":"bild.jpg","annotations":[{"label":"sneakers","coordinates":{"y":875,"x":473,"width":236,"height":602}}]},{"image":"bild2.jpg","annotations":[{"label":"sneakers","coordinates":{"y":883,"x":440,"width":245,"height":605}}]},{"image":"bild3.jpg","annotations":[{"label":"sneakers","coordinates":{"y":608,"x":362,"width":222,"height":522}}]},{"image":"bild4.jpg","annotations":[{"label":"sneakers","coordinates":{"y":777,"x":411,"width":254,"height":687}}]}]
And here screenshots from CreateML:
https://i.stack.imgur.com/y0JOa.png
https://i.stack.imgur.com/mRzMp.png
Does anyone have any idea what I am doing wrong?
I had GPU timeout and other issues. Just cancelling the error and clicking on Resume Training worked for me. The error might pop up for a few times, but after a while, the process will continue.

AKTubularBells() and AKRhodesPiano() together cause error on the second

I'm using AKRhodesPiano() and AkTubularBells(). Both work alone. When I try to initialize both, I get the following error.
AKRhodesPiano.swift:init(frequency:amplitude:):88:Parameter Tree Failed
Notably, if I change the order of initialization, the error occurs for the last one of the two instantiated.
Adding the following line to the AKTubularBells playground right under the initialization of AKTubularBells is enough to trigger the error.
let tubularBells = AKTubularBells()
let temp = AKRhodesPiano() /// <- Add this line.
I saw in another post AKRhodesPiano error (crush) on AudioKit v4.2 that there was a recent error in the STK Physical models, so perhaps this is part of that. Any insight appreciated as always.
Thanks for noticing this, it only occurred when using those two nodes simultaneously, but it was basically just a cut-and-paste job gone bad. I fixed it on develop, so if you can rebuild the framework you'll be fine or else wait for the next release which should be soon.
Here's the fix:
https://github.com/AudioKit/AudioKit/commit/05651ff97a7ea7815a27de6a53eee0b5f7998920

Sim800l AT+COPS returns 0 and AT+CREG returns 0,3

Yeah I know there is similar questions in this community But they didn't help.
It's for some days that I play with SIM800l.It's response to my at commands is good but when I want to send SMS I'll get problem.I think this Screenshot says most of story:
AT commands and response
https://ibb.co/bXxwFQ
u can see that I have signal (AT+CSQ = 19).but my module can't find and connect to operator (forgot to test AT+CREG but it returns 0,3)
and I can set CREG to 1,3 by AT+CREG=1 command.Does it help?
oh at last I should say that I'm using lm2596 for supplying and my module blinks 70 times in a minute.more than 1 time in a sec (searching for network) and less than 2 time in a sec (connected)
ANY help would be appreciated
Maybe you're not powering it up with enough supply. Your module does not automatically register to network. It happened to me when I power my sim800l with the arduino 5v, it works smoothly at first but it keeps on resetting after a while. Try to use at commands such as cband, cops, creg, and csca to manually register to network.

Runtime Error MESSAGE_TYPE_X when using SAP on Ipad mini (IOS)

In my company we´ve installed the app GuiXT Liquid UI on Ipad mini to access to our SAP-Systems.
The login works fine and we can open transactions (those which were delivered by SAP and also self-written), but as soon as we want to change variant, display a list or anything else, an Runtime Error occurs.
While opening the same transactions with the “normal” gui on windows-pcs everything works.
Following informations I get from the error message:
Runtime Errors MESSAGE_TYPE_X
Error analysis
Short text of error message:
Control Frame Work : Error in data stream <DATAMANAGER><TABLES><DATACHAN
GES HANDLE="2"><IT I; current tag PROPERTY,
Long text of error message:
Technical information about the message:
Message class....... "CNDP"
Number.............. 008
Variable 1.......... "<DATAMANAGER><TABLES><DATACHANGES HANDLE="2"><IT I"
Variable 2.......... "PROPERTY"
Variable 3.......... " "
Variable 4.......... " "
Information on where terminated
Termination occurred in the ABAP program "CL_GUI_DATAMANAGER============CP" -
in "TRACE_XML".
The main program was "RAZUGA_ALV01 ".
In the source code you have the termination point in line 2136
of the (Include) program "CL_GUI_DATAMANAGER============CL".
This is a really old question and I hope you found a solution.
I stumbled upon it while searching for help on a similar (but not exactly the same) error.
I found this note which doesn't apply to my system/error, but might apply to yours, so I'll leave it here for reference:
2318244 - Shortdump occurs in /IDXGC/PDOCMON01 when click some Process Step No. to display step additional data
Regards,
tao

node.js process out of memory error

FATAL ERROR: CALL_AND_RETRY_2 Allocation Failed - process out of memory
I'm seeing this error and not quite sure where it's coming from. The project I'm working on has this basic workflow:
Receive XML post from another source
Parse the XML using xml2js
Extract the required information from the newly created JSON object and create a new object.
Send that object to connected clients (using socket.io)
Node Modules in use are:
xml2js
socket.io
choreographer
mysql
When I receive an XML packet the first thing I do is write it to a log.txt file in the event that something needs to be reviewed later. I first fs.readFile to get the current contents, then write the new contents + the old. The log.txt file was probably around 2400KB around last crash, but upon restarting the server it's working fine again so I don't believe this to be the issue.
I don't see a packet in the log right before the crash happened, so I'm not sure what's causing the crash... No new clients connected, no messages were being sent... nothing was being parsed.
Edit
Seeing as node is running constantly should I be using delete <object> after every object I'm using serves its purpose, such as var now = new Date() which I use to compare to things that happen in the past. Or, result object from step 3 after I've passed it to the callback?
Edit 2
I am keeping a master object in the event that a new client connects, they need to see past messages, objects are deleted though, they don't stay for the life of the server, just until their completed on client side. Currently, I'm doing something like this
function parsingFunction(callback) {
//Construct Object
callback(theConstructedObject);
}
parsingFunction(function (data) {
masterObject[someIdentifier] = data;
});
Edit 3
As another step for troubleshooting I dumped the process.memoryUsage().heapUsed right before the parser starts at the parser.on('end', function() {..}); and parsed several xml packets. The highest heap used was around 10-12 MB throughout the test, although during normal conditions the program rests at about 4-5 MB. I don't think this is particularly a deal breaker, but may help in finding the issue.
Perhaps you are accidentally closing on objects recursively. A crazy example:
function f() {
var shouldBeDeleted = function(x) { return x }
return function g() { return shouldBeDeleted(shouldBeDeleted) }
}
To find what is happening fire up node-inspector and set a break point just before the suspected out of memory error. Then click on "Closure" (below Scope Variables near the right border). Perhaps if you click around something will click and you realize what happens.

Resources