Does anyone have a simple indicator that shows the pre market high and low as lines on a given chart? Would be grateful for the code. Thanks
JSParticipant
Senior
What times do you want to use for the pre-market and what time frame…?
Hi JS
1 European Markets – 12am to 8am UK time
2 US Markets – 5am to 2:30pm UK time
Many thanks
And ideally the the PML and PMH lines would then show until the start of the next premarket. Alternatively, unbroken continuous lines for the currect PMH and PML would suffice. I would like these to appear on the chart irrespective of the chosen timeframe. Thanks
JSParticipant
Senior
Hi,
When you work with times then the time frame must be adjusted accordingly, for example the end time in the US pre market is 14:30:00 so you can only use a time frame of 30 minutes or lower, moreover the highest time frame (here 30 minutes) must be a multiple of the lowest time frame (for example you can use ten minutes because 3×10=30 but not eleven minutes because 3×11<>30)
Hi JS
OK I understand and agree with you point. Thats fine
JSParticipant
Senior
This one is for the “European Markets”…
//European Markets
TimeFrame(30 minutes, UpdateOnClose)
If OpenTime=073000 then
xHighest=Highest[16](High)
xLowest=Lowest[16](Low)
EndIf
Return xHighest as "High" Coloured("Green"), xLowest as "Low" Coloured("Red")
JSParticipant
Senior
This one is for the “US Markets”…
//US Markets
TimeFrame(30 minutes, UpdateOnClose)
If OpenTime=140000 then
xHighest=Highest[19](High)
xLowest=Lowest[19](Low)
EndIf
Return xHighest as "High" Coloured("Green"), xLowest as "Low" Coloured("Red")
Thanks for the code. The indicators appears in a separate window. Is it possible to have these lines drawn on the actual chart?
JSParticipant
Senior
Hi,
Use “op koers = on graph” and the other is “nieuw paneel=new panel” you have to choose and in this case “On Graph”…
THANK YOU!! This is working perfectly and exactly what I want. Much appreciated. Cheers