0% found this document useful (0 votes)
903 views

Algox 13 Basic Version Test

Uploaded by

n.mgamerm.n
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
903 views

Algox 13 Basic Version Test

Uploaded by

n.mgamerm.n
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

//@version=5

strategy(title='Algox-13-Basic Version-Test', shorttitle='Algox-13-Basic Version-


Test', overlay=true, pyramiding=0, initial_capital=5000, currency=currency.USD)
f_tfInMinutes() =>
_tfInMinutes = timeframe.period == '1' ? '30' : timeframe.period == '3' ?
'30' : timeframe.period == '5' ? '30' : timeframe.period == '15' ? '60' :
timeframe.period == '30' ? '60' : timeframe.period == '60' ? '240' : 'D'
_tfInMinutes
my_time = f_tfInMinutes()

tf = my_time //input('15')
trade_size = input(125)

r = ticker.heikinashi(syminfo.tickerid)
ro = request.security(r, tf, open, lookahead=barmerge.lookahead_on)
rc = request.security(r, tf, close, lookahead=barmerge.lookahead_on)
plot(ro, color=color.new(color.lime, 0), linewidth=3)
plot(rc, color=color.new(color.red, 0), linewidth=3)
sel_entry = rc < ro
buy_entry = rc > ro
strategy.entry('sell', direction=strategy.short, qty=trade_size, comment='sell',
when=sel_entry)
strategy.entry('buy', direction=strategy.long, qty=trade_size, comment='buy',
when=buy_entry)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy