Supertrend SL and TP with up/down trend - pine-script-v5

I'm just starting out on pine script, I'm trying to make my SL the up/down trend in the supertrend indicator. how can i achieve this?

Related

UE5 Blueprints - Cannot use Timeline on Foreach loop elements

When using a Timeline node inside a Foreach Loop, I get some strange results.
I'm trying to move 100 pillars on only their Z axis' but when adding the Timeline node to the code and using a lerp to try and smoothly transition the pillars, it only affects one of the 100 Actors. Also, the animation of the one that does move looks very jittery as if it's being lerped 100 times itself.
Without the Timeline and Lerp nodes, I get the desired effect but without the smooth transitioning between the original Z position and the new random Z position.
Has anyone else had any issues whilst using a Timeline node inside a Foreach loop and if so, any solutions?
Thanks!
Code with Timeline and Lerp nodes - Not giving the desired effect
Screenshot of the 1 pillar that transitioned - Should be all of the pillars
Code without Timeline and Lerp nodes - Gives desired effect without the smooth lerp transition
Screenshot of the desired outcome - No smooth lerp transition when testing

Modeling Contact in Abaqus

I have simulated a 2D model in Abaqus which indicates 2 main part, first a sector that represent as wheel and, second a rectangular that represent rail.
the wheel and rail are in contact and wheel should rotate and move from left to right. there is a vertical small crack in middle of the rail to studying the result of contact on fracture mechanics.
my model has been completed, and in the 1/10 of total time good result has been achieved but after that the stress distribution is completely wrong and although the contact seems to exist, the stress is almost zero.
Any guide, comment or advice would be appreciated.
thank you

Head movement detection using 1 accelerometer

I've been assigned a small project of designing a turning jacket for cyclist, which is used to indicate when the cyclist turns right or left using LEDs attached to the back of the jacket. I plan to use 1 accelerometer to detect the head movement. There are simply two kinds of movement: left and right. Is it possible to use 1 accelerometer to specify the movement of the head?
Thanks!

Animating a turntable using Matlab's GUIDE

I have an application where I have a stepper motor connected to a turntable. The stepper motor's driver is controlled serially via Matlab.That is, I can control the angle through which the stepper motor turns the turntable and the speed at which it is happening by sending data to the stepper motor using a serial port in Matlab. Once the stepper motor turns by the required angle, it returns its current angle back to another serial port.
I am trying to build a GUI where the user can input the speed and the angle to which the turntable must be turned.I want to be able to illustrate the rotation of the turntable on my GUI itself, using the data about the current angle that the stepper motor returns to me.
Can anyone suggest a good way to creat and animate the turntable's rotation using MATLAB's GUIDE? The animated figure must be able to display the current angle with its initial reference angle. What I have in mind looks like the figure below.
Just plot eveything with lines and update the lines accordingly, don't be afraid to start using some math to calculate the angles and line end points, and to plot the circles. This is something pretty easy to do.

Power Meter - Cocos2d/Box2d

How would I create a power meter that shoots a ball in the direction and power chosen by the player?
I also have a button that will "fire" the ball.
Any ideas?
Not sure what you mean, but maybe you can look at CCProgressTimer. With this you can set the percent of the image you want to show (using a horizontal type for your standard progress bar - or whatever).
The code that you need is:
timer.type = kCCProgressTimerTypeHorizontalBarLR;
timer.percentage = 0; //of whatever percent you want to show (you need to update this manually)