Pine script signal when bar closes higher or lower than pivot point open - pivot

I have coded a pivot point in pine script but now I want to add the S2-signal that indicates that:
a bar closes ABOVE the OPEN of the first pivot point bar (for an UPtrend) and
a bar closes BELOW the OPEN of the first pivot point bar (for an DOWNtrend)
This could take a few bars so I'm thinking a bar_index would be helpful but I can't figure it out (because I'm not a coder). Whenever there's a new pivot point, the check starts again.
If someone could help that would be great.
[]

if i understand what's you need:
trendup = close[1] > close and close > pivot point
trenddw = close[1] < close and close < pivot point
But without a piece of source code is difficult understand

Related

How can I limit the display of columns on Excel?

I would like to create an Excel document with all the date from 01-01-2018 to 31-12-2018 with each day in a separate columns but only display a certain amount of days (not the entire year) with the possibility to scroll left or right to see the rest. What can I do to achieve this ?
I've tried to to freeze the panes but it's not what I want.
What I have :
What I would like (with a scroll bar) :
You can only freeze one side of the table, and even if you use the Split button to try to hold the other side still, it turns off the freeze, so you can't do both at once (which would have solved it).
https://support.office.com/en-us/article/split-panes-to-lock-rows-or-columns-in-separate-worksheet-areas-516a7001-b3ed-4122-a6bb-fd6d4a9d6434
If you turn the spreadsheet sideways, so the dates go down the page instead of across, you may be able to do something with the Group button:
Sorry but I don't think there is a way to solve it properly, maybe you can move the static columns from the right over to the left too?

Do MT4 objects get deleted themselves when the corresponding bar goes off the chart?

I create small trend lines to augment an indicator that I use. The drawing of the trend lines work perfect. However, when the chart has scrolled past the number of bars that MT4 is set to, the objects seems to pile up.
The trend line has a open time and a close time in the ObjectCreate() command (as shown below):
bool bSuccess = ObjectCreate( 0, sName, OBJ_TREND, iIndicatorWindow,
dtOpenTime, dOpenPrice,
dtCloseTime, dClosePrice
);
I would think that as the bar scrolls off the screen, the corresponding trendline will be deleted as well.
Could you please let me know if I need to delete the objects that scroll off programatically (instead of waiting for MT4 to delete them)?
Once created, objects remain alive, does not matter how much time passed. If you need - try to delete the object, if not - leave it and seek for the newest object (loop over ObjectsTotal()) to find the newest one that meets your criteria.

Excel text data import Step 3 select columns via keyboard on Mac

I am experiencing the following issue in Microsoft Excel for Mac 2016. When using the From Text data import function and clicking through the first two steps (selecting "Delimited" and defining delimiter), Step 3 allows for changing the column data format. By default, column 1 is selected and I can click to select any other column that fits into the window, as shown in the screenshot below. However, it seems that it is not possible to select columns that are to the right of those visible in the window. In my example below, there are about four more columns to the right. Scrolling and arrow-keys seem to not work in the Mac version.
Is there a keyboard shortcut, or some other workaround, that I am missing?
Perform a two-finger touch (not a complete tap), more like a contact. A slider bar will appear at the bottom of the columns. Now is your chance to grab it with one-finger click. If you begin with the pointer in the bottom part of the columns, it is much easier to grab the slider as it should be under the pointer. This probably works on other such windows.

Bug with Excel form control - scrollbar keeps scrolling

I'm creating a dynamic chart using an Excel form control -- the scrollbar -- and the way this works is exactly as described on http://www.excelcharts.com/blog/animation-interaction-and-dynamic-excel-charts/ (towards the bottom). I have a chart of data, and a column called "Chart source" that just does an index match based on the scrollbar's linked number. When you click through the scrollbar, it updates the chart source column and thus the chart.
The problem I'm having is that when I click the scrollbar, it keeps scrolling all the way, to either the left or the right, instead of moving incrementally one by one. The number counts through 1 by 1, but it goes all the way as if I were continuously clicking the button. This behavior stops in its tracks if I click and then move the mouse out of the arrow area. I've tried messing with the form control's "incremental change" and "page change" options to no avail. Things that do work: I can click and drag the scrollbar itself to the place I want it. I can type a new number in the cell linked to the scrollbar, and the scrollbar will jump to the right position.
Does anyone have an idea of how to fix this bug?
EDIT: I figured out the problem. This is a bug in Excel. If you are in "Page Break Preview" mode instead of "Normal" mode, this behavior will happen. Switching back to "Normal" mode (the first of the three icons in the bottom right next to the zoom) fixes this behavior.
This problem occurs when calculations that result from the changed value that is controlled by the scroll bar, takes too long. Changing to Manual calculation mode resolves the problem (although of course is not necessarily desirable in all cases)...
(see http://www.pcreview.co.uk/forums/slider-bar-continues-increment-mouse-hovers-over-arrow-t3064239.html)
The same has been happening to me, but my excel sheet was in "normal" mode.I believe the original answer is correct. I noticed this happens when I press a combination of keys or my hand lightly brushes across bottom pf laptop. Very annoying. Finally I sit and wait for the scrolling to stop then click back to top of sheet.
Possible answer... I have the problem with one type of worksheet, but only when another worksheet with VBA code is open. A fix might be, in the first worksheet:
File\Options\Advanced\Formulas\un-check Enable Multi-Threaded Calculation
I figured out the problem. This is a bug in Excel. If you are in "Page Break Preview" mode instead of "Normal" mode, this behavior will happen. Switching back to "Normal" mode (the first of the three icons in the bottom right next to the zoom)

Can I make Excel scroll smoothly without using middle-click?

I must work with nightmare Excel files. (I didn't create them, I just have to work with them).
They were so big (more than 50 big columns and 100 big rows) then I must scroll up/down and use "<" and ">" buttons to scroll left and right. When I scroll around, Excel always jumps to the next column or row. This make me crazy!
Can I develop a plugin or add-in to make Excel just scroll smoothly, like web browsers do? If so, please give me some resource or just some keyword to learn how to do it.
Another tip: when you click on Scroll lock on your keyboard, this will change the way your arrows keys will work.
Instead of moving from cell to cell, it will move the screen.
Yet, as Issun said, you cannot change Excel and AFAIK, you cannot "split" a cell when scrolling.
Furthermore, you can also change the number of rows that will scroll in the Windows Control Panel.
I'm sorry to tell you but the snapping to the top of a cell when you scroll is a design choice by Microsoft that you simply cannot get around while working within Excel. You can middle click your mouse to enable smooth preview zoom with the mouse, but once you click the program, it will snap back.
Instead of looking for a plug-in, you should look for a different program to run the .xls files to work on them. Perhaps even something as simple as opening the document in Google docs might allow you to scroll normally.
That being said, if you are having the problem of the cells being so big that when you scroll down it skips over some cells, assign either a command button or keyboard shortcut to this macro:
Sub DownOne()
ActiveWindow.SmallScroll Down:=1
End Sub
I have used this on several occasions due to Excel skipping cells because of their size. The reason is that the mouse "single scroll down" is by default set to Down:=3
You might be able to map this macro to a mouse wheel scroll event, but I believe you need to add a .dll to use that event (ref: http://support.microsoft.com/kb/837910)
Click down on scroll wheel (middle) of mouse (remember not turn, but click down). This will produce unique four way arrow. Now drag mouse up or down (or even sideways, left or right) and you will get slow smooth scroll.
Well, this is an extremely old thread, but I was having the same problem today.
Try going into your Mouse Settings in Control Panel and set your Wheel to Scroll 1 line at at a time.. I have some rows that are merged, and it was frustrating the hell out of me how quickly it would scroll past them. Turns out, I had my Wheel set to scroll 3 lines at a time (default I think).
Took me forever to figure it out (felt like an idiot once I did).
Note - You'll want to go back and set it back to 3 lines when you're done in Excel because it makes it painfully slow to scroll in your web browser.
Old thread I know, but I found a work around (if this is a repeat suggestion, sorry). Leave Column A alone, with "normal" sized cells. You can hide this column if you don't want to see it. Put all your contents in the remaining columns as you normally would and merge the content over several rows. Since column A is normal sized, you will get "smooth scrolling".
I had the same problem until I upgraded by office from 2014 to 2017. Now I have office 2017 [version 15.33 (170409)] and I can scroll by pixels using Mouse as well as Laptop trackpad. I am using MacOS Sierra version 10 operating system.

Resources