Actualisation of EPS and Sales before the US market opens - TradingView - pine-script-v5

I am using the EPS & Sales indicator of the user "Fred6724":
Link : https://fr.tradingview.com/script/WiaFmLGR/
and I would like to know if it is possible for the EPS to update before the US market opens.
Typically, before the open we can see the EPS and Sales on the little widget arrow built into TradingView but the 'request.earning' function seems to wait until the next candle opens to update numbers into the table.
(See attached document for illustration:Illustration of the lag)
(Ignore the sales lag, it has been corrected)
My question is, how could I rewrite the script so that the last row of the table has the same value as in the 'E' widget information built into TradingView?
What I tried:
I have already tried to use 'lookahead = barmerge.lookahead_on' but the result is the same.
I just have no idea how to proceed, it seems that TradingView doesn't have a built-in function to do that.
Thank you in advance.

Related

copy/paste row with event 1 row down and create new event on top of former row with event. The events themselves are text

I hope you will be able to help me.
I need to do the following in Excel:
a. Newest event comes on top and the former event moves 1 row down (below), and;
b. After newest event has been copied and pasted to 1 row down, the first row is clear of any data (blank cells);
c. Now a new event comes on top of the former event. If there is also a new date involved than everything the old events and dates moves at least 2 rows down and leaves a blank row in between. And so on until a full month has been reached;
d. After that the entire sheet/month is copied to an archive.
I've been trying to write the code for this in VBA, but thus far it's not working. To be honest, I can't code and I've trying to do this through youtube and everything I can find online.
I would greatly appreciate any help I can get on this one. I'm new here so I can't a picture just yet. Hopefully somebody understands my questions.
Again thanks for any help on this one.
enter image description here
The picture describes pretty much how I want this to work
I'm answering my own questions, because I sort figured it out and I'm really excited. So the code is not perfect, I know but it works :)
There are two type of code running:
1.
Sub MoveCopyRows()
'Copy and Paste Row
Range("10:10").Copy
Range("11:11").Insert
End Sub
And
2.
Sub CutInsertSheet()
'Cut or Copy and Paste to another worksheet
Worksheets("Overdracht").Range("11:35").Cut
Worksheets("Berichtenhistorie").Range("6:6").Insert
Application.CutCopyMode = False
End Sub
This coding has got me hooked. Now I'm going to see, if I can combine them and if I would be able to change the cell color automatically after adding a new row. Wish me luck everybody! :) And before I forget, thx everybody for your help!

I need to switch to numbers-only keypad input on mobile after 6 letters

I need to create a field where customers, on mobile, enter their "codice fiscale" (tax code). The code has this structure: (L=letter N=number)
LLLLLLNNLNNLNNNL
So basically what i'm trying to achieve is to automatically switch the user's keypad to numbers only when the next character has to be a number (on positions 7,8,10,11,13,14 and 15). I've seen it in some apps, but i can't figure out any way to do it.
Thanks for your help!
Screenshot to explain better what i mean

LibreOffice BASIC function - Copy if over a value to a new sheet

I'm trying to create a simple function on a LibreOffice Calc sheet.
I have a table of information where cells A1:K2 has headings (the cells in Row 2 are merged)
all the information runs from A3:K176
The sheet has various functions running on it already, all I need is one more function.
At first I wanted it to automate when i open, but then i thought running the BASIC macro off of a button might be better, so i can edit and then just hit the button once I'm done.
I have the button linked up to run the macro already, but now im stuck... I have tried many ways of writing the code, but it seems that i am just too green to figure it out.
the last time i ran Excel advanced functions i was in high school.
ok, enough talking...
All I need the macro to do is once I hit the button, I need it to check column K and any value > 1 it needs to take that whole row and copy it then go to a target sheet, clear any data on the target sheet. then copy that set of rows to the next open row in the target sheet. possibly even exporting the result to a .txt file as a bonus.
this is a start...
in future I would like to add another button that will do the same function to a array lower down and put that into a different sheet.
Option Compatible
Sub SWD_AwakeningsTrade
Dim i, LastRow
LastRow = Sheets("Card_List").Range("A" & Rows.Count).End(xlUp).Row
Sheets("Awakenings For trade").range("A2:I500").clearContents
For i=2 to LastRow
If Sheets("Card_List").Cells(i,"K").Value = "(>1)" Then
Sheets("Card_List").Cells(i, "K").EntireRow.Copy
Destination:=Sheets("Awakenings For trade").Range("A" & Rows.Count.end(xlUp)
End if
next i
End Sub

Bokeh - How to use box tool without default selections?

I have built a bokeh app that allows users to select windows in data and run python code to find and label (with markers) extreme values within these limits. For ease of interaction, I use the box select tool for the range selection. My problem arises when repeating this process for subsequent cases. After markers are placed for the results, they are rendered invisible by setting alpha to zero and another case needs to be chosen. When the new select box includes previous markers, they become visible based on the selection. How do I override this default behavior? Can markers be made unselectable? or can I add code to the customJS to hide them after they are selected?
Thanks in advance for any help!
There are a few possible approaches. If you just want non-selected glyphs to "disappear" visually, you can set a policy to do that as described here:
http://docs.bokeh.org/en/latest/docs/user_guide/styling.html#selected-and-unselected-glyphs
Basically, for bokeh.plotting, pass
nonselection_fill_alpha=0.0,
nonselection_line_alpha=0.0,
as arguments to your plot.circle call or whatever. Or if you are using the low level bokeh.models interface, something like:
renderer.nonselection_glyph = Circle(fill_alpha=0.0, line_alpha=0.0)
But be aware (I think you already are) that the invisible markers are still there, and still selectable if the user happens to draw a box over them with the selection tool.
If you truly want only a subset of the data to be visible and selectable after a selection, I'd say you want to replace the data in the column data source wholesale with the subset in your selection callback.

How do I set size of colums in a table subform datasheet view in MS Access

I have a subform bugging me. The mainform contains buttons etc. Everytime the user close/open the form, the columns width is reset to whatever the table likes. If i open the table directly, the size is as i want. If i change it in the subform, it is not saved. (See screendump)
I would like "Phase" to stay about 2 cm width. I can enter the subform and edit the "Width" but that is only applied to the other views.
I hope you can help, Emil.
I realize this post is almost 2 years old, but I ran into the same problem and came across this post.
I am running MS Access 2013 on Windows 7 Ultimate. I did not find the solutions offered here to work for me, so, I set out to find something that would work for me before I went to VBA code. (Incidentally, I appreciate the link offered by #Patrick_Honorez in his comment on the original post because that was going to be my fall-back solution.)
Anyway, here is what worked for me and I hope perhaps it will work for others as well:
Open the parent form.
In the subform, right-click the column header
for the column for which you wish to adjust the width.
Select the “Field Width” item from the context menu.
In the “Column Width” dialog that appears in step 3, enter the desired column width in points, or, use the [Best Fit] button. Then click the [OK] button to close the dialog and return to the form.
Right-click the parent form’s border to bring up the parent form’s context menu. Click the “Save” item in the context menu.
Now close the parent form.
The next time the form is loaded, the column widths should be as set it step 4 above--at least they are for my setup.
I see this post is quite old and OP must have figured someway to tackle the issue. I came across same issue today and found solution on this link.
For anybody else having same issue, use following code (I modified the code a little because original code from the above mentioned post saves column width of only text boxes but my form has combo boxes too, column width of which was not getting saved) in close and open events of your subform and then open main form in Form View and then manually select desired widths either by mouse, by entering column width value or using best fit. Save the form and reopen to check results. That's it.
Private Sub Form_Close()
Dim ctrl As Control
For Each ctrl In Me.Controls
If (ctrl.ControlType = acTextBox Or ctrl.ControlType = acComboBox) Then
SaveSetting "propertiesDBS", Me.Name, ctrl.Name, ctrl.ColumnWidth
End If
Next
End Sub
Private Sub Form_Open(Cancel As Integer)
Dim ctrl As Control
Dim frm As Form
Dim w As Long
For Each ctrl In Me.Controls
If (ctrl.ControlType = acTextBox Or ctrl.ControlType = acComboBox) Then
w = GetSetting("propertiesDBS", Me.Name, ctrl.Name, 0)
If w <> 0 Then ctrl.ColumnWidth = w
End If
Next
End Sub
I know this is late to the party and most likely going to be the last comment anyone reads, but this can be done quite simply in MS Access 2016 - by someone like myself who has no more than 4 days experience in databasing overall and no experience with writing custom Macro's or VB Script (using only what is native to MS Access).
Here's how I did it.
Scenario - Split Form (Form + Datasheet).
Extra Recommendations:
It pays to be across all properties of every object type in your database, as a change in a field property can cause unpredictable erratic effects, which take ages to figure out why it happened and how to stop it from happening again, whilst delivering your desired outcome.
Me.Requery in your VBA script after every necessary event and also in your main form (generally the 'After Update' event is used most), and be wary that too many Me.Requery's (in unnecessary events) can also be detrimental - so too much of a good thing can be a bad thing.
Bottom Line Up Front - Modify the format of your query that is to be exported/printed.
In 'Design View' of the query you are concerned with, ensure that the fields are in the order you need them outputted in first as this is exactly how the macro will present them for export/print (example could be "Australia" then "Northern Territory" then "Town's In The Northern Half Of The State" then "Darwin" then "Suburbs In The Northern Half Of City").
Switch to 'DataSheet View' in the same query and use the top left folded over triangle looking thingy to highlight the entire data set then right click that same triangle to present an options menu. Select 'Row Height' and type in "15" (default row height in Excel).
Deselect the entire spreadsheet and this time select every column (left click the left most column, hold shift button, scroll over to the right to the far end of the data set and click the last column) and then right click one of the highlighted columns to present another menu. Select 'Field Width' and within that new pop-up menu select 'Best Fit' and then 'OK'.
(Optional - not sure if this helps or hinders but I did it for my purpose) With the columns still selected right click one of the highlighted columns again and select 'Freeze Fields'.
My scenario had buttons with macros configured to run filtered reports so I was able to check this by simply clicking any of those buttons and seeing the report formatting, which it held true to the work I had just done. I exported using another button with a macro that exports to Excel with 'Print Formatting' selected (my main form also had the datasheet view as the only thing that could be printed and was also set in 'Print' formatting.
The Excel spreadsheet opened with all row heights and column widths in a way that I could read every field/record with perfect ease and without extra modification.
This also worked for cascaded combo boxes, with the export only outputting the 'drilled down/filtered' datasheet records, in a format that required no further modifications.
Hope this helps someone, as its saved my hide! :)
Open the Main form in Design. Go to the SubForm. Click on the square at the top left of the SubForm and select 'Properties'. Right-Click the control 'Phase' and click 'Properties'.Click the 'Format' tab and select 'Width'. What do you see there? That should control the widht of control 'Phase' unless you have some overriding coding elsewhere. Input the size you want and see what happens.
Use continuous forms instead. It gives you complete control over how your subform displays.
If you open your subform directly, your property sheet menu should display automatically if the default view is "Datasheet." Click on "All" and change the "Auto Resize" property to "No." This should solve the issue and avoid the need for VBA.
This only works when you open the subform separately. So if you want the changes to be reflected within your main form, you'll have to close it and switch back and forth.
Super annoying by default.
It seems to work as one would expect of you set the view mode to layout view. Drag column widths as needed and save. Go back to form view and it works. It's really dumb it doesn't work the same way in form view our design view.
In Access 365, open main form, right-click sub-form datasheet columns that need width adjustment, use the Field Width to adjust, click on border of main form to select Layout view, and save changes.
Open subform in datasheet view (by double click on subform in the left pannel)
Resize columns as you want by dragging or by right-click the column header for the column for which you wish to adjust the width and select the “Field Width” item from the context menu.
Right-click the subform border to bring up the context menu. Click the “Save” item in the context menu.
Either open the Main Form in Layout View or directly open your Subform in Datasheet View. Right Click on the Field Header, select Field Width, and enter the desired width. Save. Bewm.
My solution (Access 2016) was to create the main & subform, recreate the subform on its own using form wizard and set it up the way I want it, rename the original subform to something else, and finally rename the recreated subform to the original form name. Open the main form and the subform should be laid out the way you want it. You can then delete the original subform you renamed.