Indicator for tradingview - pine-script-v5

I would like to create an indicator on tradingview that returns the gap of an instrument that I am going to select, then I would like to compare it with the performance of the chart.
Within the indicator I would like to have the ability to select a different instrument from the chart
I'm a complete newbie and wish someone could code me. I don't think it's difficult and I tried to write something but unfortunately after several attempts I can't get it to work

Related

How to achieve this UI using flutter, Image below

I was wondering how I could create this UI in flutter.
This Indicated the progress of a task.
Probable Options are:
Use a already available package
Hard Code using Containers ( Least Prefered )
Slider or Progress Bar Indicator
Note:
The progress bar should be able to show progress at all three values (Which I will provide it while building).
Please share code and tips.
You can use the timeline_tile package.
The horizontal timeline should be exactly what you need

How to implement a customized spinner to select time in flutter

I am currently trying to implement a time select Widget, it should look something like this:
Image_Link.
And it should work like shown in this video:
https://streamable.com/2y7s65.
I would like to have the design, shown in the picture combined with the wheel in the video to select a specific time.
But I am struggling with this for a while. I know there is a package: flutter_time_picker_spinner, but I count't find any way to customize the spinner in the way I need to (like in the picture: Image_Link )
I hope I gave enough information, if something is still unclear please tell me.
My approach would be download https://github.com/icemanbsi/flutter_time_picker_spinner/blob/master/lib/flutter_time_picker_spinner.dart and style it as you like.
You can use ListWheelScrollView to get the result you are looking for. Style each individual button the way you want and add them as children. From there you can style the ListWheelScrollView to get your desired look.

vscode display documentation in new tab/window

I have been using kite(python) for the past few months and I really like how I can just glance at my other monitor to view all the documentation of a function. The main thing that I like about it is that it updates pretty much instantly when my cursor moves to another function(-call) and that I can span it over a large area on my display so I see all the documentation at once.
I was wondering if this or something similar can be done within visual studio code itself. It can show a preview/the entire documentation of a function in a small popup so it must be possible to show it in a separate tab that also updates when your cursor moves to another function, right?
TL;DR: I want to view the documentation of the function under my cursor in a separate window.
Is this possible? How can I configure this?

Hide filter depending on sheet in dashboard

Hope you can help.
I have attached my workbook. Basically, I have made swapping sheets. The sheets have different filters, and I need the filters to disappear depending on the sheet showing.
I have no problem with the sheet swapping. I been going through the internet for hours, without finding a good solution. I did look into this: New series of videos on swapping and popping on a dashboard(https://vimeo.com/294170859), but did not find it that helpful since it is not very flexible and too difficult to use if you have many filters, that need to change.
I have some kind of an Idea, of putting my filters in each of their container, and then have the container showing depending the sheet but do not how either.
But in the end, the filters needs to appear in the same spots too.
But I really need your help - Simply can't find a good solution!
Thank you!
Without putting your filters in containers and swapping those I can't think of any alternative way to alter which filters appear on your dashboard.
I don't know the exact specifics of your task, however, having perhaps faced similar issues almost always the best solution is to simplify. If possible instead of swapping sheets consider a new dashboard and just "show sheets as tabs". Altering a parameter is a click, just as clicking a dashboard tab - so no difference to the user. Also changing filters may be confusing to a user - they generally get used to seeing things in a certain place.
Of course none of this may apply to your specific situation.

How do I get a chart to redraw itself when the model is paused?

I have a Time Stack Chart whose data set can be changed by clicking on a radio button. While the model is running, the chart instantaneously updates its appearance when a radio button is clicked. When the model is paused, however, the chart's area becomes blank when a radio button is clicked; the legend, in contrast, updates automatically. How do I manually force the chart area to redraw itself?
When you pause a model, only a part of Anylogic is actually paused. The thread that handles the GUI keeps running, which is why you can navigate around in the model while it is paused.
This also means that if you try to update a chart's data while the simulation is paused, the appearance will refresh but -- as your data is being updated in another thread that is currently paused -- it will not have received that data.
If you want to pause the simulation and still be able to switch the data being displayed in a chart, you could take a look at the Airport example model. It provides a good method to switch between different charts by making them visible/invisible and adjusting the width, height, x and y. Essentially, you make all of the charts you need, overlap them perfectly, and then make visible the one that is currently of interest to you.
If you want to create the charts programmatically, on top of creating the chart with, e.g., new TimeStackChart(...), you also have to add it to the top level presentation group with main.presenation.add(...). If you don't do this, the chart will never appear in the model as the model won't have anything to display! To find more information on how to create a chart programmatically, make a chart in Main and then open Main in the Java editor. Find the chart you created, take a look at it's constructor (there are a lot of arguments!), and use it as rough template for the charts you wish to create. The Help documentation will further make sense of the parameters you see.
have you tried the chart.refresh(); method?
Also try to update the embedding agent using agent.onChange().
hope that helps
I encountered the exact same problem, and came up with workaround.
Try this, which I know works in AnyLogic v7:
if (getEngine.getState() == getEngine().PAUSED ){
dynChart.setSelectedItemIndices( new int[]{0} );
dynChart.setSelectedItemIndices( null );
}
I was able to get the chart to refresh manually when paused or finished by selecting/deselecting one of the legend items. I spent a few hours try out API variations to no avail, so I just emulated what was actually working in the UI and it worked.
I am dynamically generating a text item as the chart title, but I have not had the same luck getting the text to refresh when paused like the chart. Any ideas on that one?