how convert pine script code to cbot

Created at 26 Mar 2022, 20:39
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
BankLevel's avatar

BankLevel

Joined 19.11.2020

how convert pine script code to cbot
26 Mar 2022, 20:39


hello to every one, any one can help me on convert the pine script to cbot 

 

the code i need convert is this :

//@version=4
study("ORB", overlay = true)

inputMax = input(5, title= "ORB total time (minutes)")
sess = input("0915-0920", type=input.session, title="Session Time") 
t = time(timeframe.period, sess + ":1234567")
hide = timeframe.isintraday and timeframe.multiplier <= inputMax

is_newbar(res) => change(time(res)) != 0
in_session = not na(t)
is_first = in_session and not in_session[1]

orb_high = float(na)
orb_low = float(na)

if is_first
    orb_high := high
    orb_low := low
else
    orb_high := orb_high[1]
    orb_low := orb_low[1]
if high > orb_high and in_session
    orb_high := high
if low < orb_low and in_session
    orb_low := low

plot(hide ? orb_high : na , style=plot.style_line, color=orb_high[1] != orb_high ? na : color.green, title="ORB High", linewidth=2)
plot(hide ? orb_low : na , style=plot.style_line, color=orb_low[1] != orb_low ? na : color.red, title="ORB Low", linewidth=2)


@BankLevel
Replies

amusleh
28 Mar 2022, 09:35

Hi,

Please post a job request or contact a consultant.

 


@amusleh