How do I create an alert that triggers when a plotshape of offset,-10 is displayed on the chart - pine-script-v5

I tried using the ta.barsSince operator but didn't work.i would be very happy and grateful to see my question being answered
Could offsetting the bar_index solve the issue,I also tried creating a label which worked but for some reason i can't create an alert that would trigger when the label is displayed.

Related

Incomprension UI Menu trouble with slider

My problem is that my slider change even when I am not on it but sometimes one special points it changes, I think it s because of the greensquares but why and how to repair it ?
I do not have a single idea on how to do it so please help me.

Add additional buttons to Autocomplete

I would like to know if its possible to add an additional button next to the cross, and down arrow on the Autocomplete, but still leave the current buttons intack.
I tried using endAdorement on the text field, and it removed the existing buttons.
I think there is probably some correct way to do this, but still not seeing it.
Thanks in advance for any help.
Cheers
Jason
Have worked out how to go forward with this, incase anyone else has the same issue, use the useAutocomplete hook, and then render it however you want too.

How to stop flickering form button

I am making a form in ms-Access and needed buttons. A problem I am sure lots of you got is the flickering of certain button when going over them. I have searched around and found the same problem multiple time and never found the right answer.
People suggested things like changing labels to disabled textbox but it didn't work. I also tested it without anything else but buttons and it still does it. One of the first suggestion i actually found was disabling the theme, but still nothing. The latest tested suggestion was a pop-up window of the form and it still fail to fix the problem.
If you want to test it, just create a blank form and but multiple button. To see the effect more clearly, disable them all. Then go over them with your mouse multiple time and you'll eventually see the visual-glitch.
Is there reasons why those glitch happen? It seems to have been there for around 10 years. If you got a workaround, i would really appreciate it.

Jquery Chosen Select scroll issue

I'm using JQuery chosen plugin, chosen single select. when i'm opening the dropdown which listing some set of values loaded in. also it's showing vertical scroll. i can able to scroll using scroll bar and mouse scroll, but i cant able to select the specific item. when mouse hovering the item, then the drop down taking me to the end of the list.
help me to fix this issue.
I found the answer for this.
thanks guys for spending time on this
the answer is
In chosen.jquery.min.js file the is code like
c = this.result_highlight.position().top + this.search_results.scrollTop(),
replace the above line by
c = this.result_highlight.position().top,
then the scroll issue will be fixed.
According to this issue https://github.com/harvesthq/chosen/issues/2504#issuecomment-194773350
the problem seems to be solved when updating the jQuery library.
I can confirm that upgrading to jQuery version 1.12.1 fixes the issue. 1.12.0 is the one with the issue.
-- DrowningElysium

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?