Find High or Low before entry

I need a code to find highest high or lowest low before any entry signal and place it as stop loss

1 Like

Your question is vague.


Hello people.
I need an AFL code to find out highest high or lowest low from the starting of the day untill i take long or short entry. i need this for Intra-day level. Conditions are as follows

  1. Day has started at 9:00 AM
  2. Buy or short entry signal appears at a time 'X'.
  3. Now i need highest high or lowest low from 9:00 AM till time 'X'.

I am a beginner and i don't have any Pre-written codes for this condition yet!.
Kindly provide me a code for the above condition

@jey you may find this article helpful:

@mradtke thank you. I have already tried it. The issue is am not able to show the coding time of Buy or Short signal.

If you post your code, it would be much easier to suggest how to fix it. You probably need to use the ValueWhen() function.

Its old strategy. High or low breakout

I mean that you need to show us the AFL that you're using. Post it here, properly formatted with code tags. Otherwise, everyone just has to guess what you're doing and where you might have made a mistake. The best way to get help is to make it as easy as possible for others to help you.

1 Like

Ok. Sure. Will get back with properly formatted code tags in shortwhile