Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Obtain the MOST RECENT between the yesterday HIGH and LOW in a signal
for a new strategy currently under development I need to obtain wich is the MOST RECENT price of a future between the yesterday HIGH and LOW (probably between dailyHigh[1] and dailyLow[1]).
I surfed the web and I didn't find any quick solution or reserved words to obtain the exact time when the dailyHigh[1] and dailyLow[1] so apparently there's not an easy way to calculate this (unless you know eheh please tell me).
Anyway I was thinking to create a code in my strategy that is updating the HIGH and the LOW of the day on every bar and then save the related time_s of the bar and then at the end of day it compares the time to establish wich is the most recent value in order to use it in the morning at the session open to made some calculations to obtan some price levels for my strategy.
My idea is this:
So basically after the session close at 22:00 I'm going to make the comparison at 22:30 to discover wich is the MOST RECENT price of the DAX future between the yesterday HIGH and LOW. Then in the morning at the session open at 01:15 I can use the MostRecentPrice to make some calculations.
So this is the idea but I'm not sure if it is the Best solution for this problem.
What do you think? Is this the easies to way to achive my purpose or is there an easier way and/or keywords reference (that I wasn't able to find at FIO or surfing the net).
thanks,
David
Can you help answer these questions from other members on NexusFi?
Ok so I'm using this code from the link above and it works perfectly to obtain the Min and Max value reached during the previous day:
Then I modified the last "if" part including a FOR cicle to obtain in with number of bar occured the todayMax and todayMin :
I can't manage to have it working as it should as the login seems correct.
I'm struggling to find a way to know wich is the most RECENT between the DayHigh and DayLow of the previous day.
I need tha latest max or min of the previous day to calculate some levels in the morning at the session open.
I thought that by using a Barcount and save it when the min or the max condition is met could be a solution but it is not actually.
This is the output in powerlanguage MC editor:
Clearly there's something wrong as you can see the in the output and I have several days with the same barYmax and that's almost impossible (it really uncommon that you have the max of the day at the same barnumber for three days in row).