Help to code a strategy about percentage increase or decrease for OMXS30
Forums › ProRealTime English forum › ProOrder support › Help to code a strategy about percentage increase or decrease for OMXS30
- This topic has 17 replies, 6 voices, and was last updated 4 years ago by Vonasi.
Tagged: Suede Index, Sverige30
-
-
01/17/2019 at 1:08 PM #88917
Hi,
I’m new at trading and programming so I wonder if someone can help me to code this for me so I can get started. My request:Underlying asset: Sverige30 Cash (20sk) Index
Open position after 17:30, after hours trading
Buy when > 1 % down
Take profit if increases 0,5%
Take loss if decreases 0,25%Sell when > 1% up
Take profit if decreases 0,5%
Take loss if increases 0,25%Close position at 08:59 day after, before opening hours
Trade size: 20
01/17/2019 at 1:12 PM #88918I assume you want to use it on a 1-minute TF, don’t you?
1% compared to previous day closing price?
01/17/2019 at 1:15 PM #8891901/17/2019 at 1:30 PM #8892201/17/2019 at 1:36 PM #8892501/17/2019 at 2:02 PM #8893001/17/2019 at 2:04 PM #8893101/17/2019 at 2:19 PM #8893201/17/2019 at 4:02 PM #88963@robertogozzi,
Yes thats right, 1-minute TF.
When the market close 17:30, after that 1% compared with closing price01/17/2019 at 5:26 PM #88979Try this one:
1234567891011121314151617181920212223242526DEFPARAM CumulateOrders = falseTradeOFF = opentime >= 090000 AND opentime <= 173000ClosingPrice = 0IF OnMarket AND time = 085900 THENSELL AT MARKETEXITSHORT AT MARKETENDIFIF LongOnMarket THENIF (close >= (TradePrice * 1.005)) OR (close <= (TradePrice * 0.975)) THENSELL AT MARKETENDIFELSIF ShortOnMarket THENIF (close <= (TradePrice * 0.995)) OR (close >= (TradePrice * 1.025)) THENEXITSHORT AT MARKETENDIFENDIFIF OpenTime = 173000 THENClosingPrice = closeENDIFIF Not OnMarket AND Not TradeOFF THENIF close >= (ClosingPrice * 1.01) THENBUY 1 CONTRACT AT MARKETELSIF close <= (ClosingPrice * 0.99) THENSELLSHORT 1 CONTRACT AT MARKETENDIFENDIF1 user thanked author for this post.
01/17/2019 at 10:06 PM #88997@alipour , by exemple simple title : suede index market strategy
@swapping Hi, can i get in touch with you private? =)01/17/2019 at 10:14 PM #89000No private info can be posted.
Any member willing to contact other members can only do this with the help of ADMIN. Contact him first.
01/18/2019 at 12:52 PM #89046@robertogozzi
thank you for your help.Is it possbile to back track this strategy?
01/18/2019 at 1:01 PM #89047You can backtest it as any other strategy with ProBackTest. You can launch it from ProOrder after creating the strategy using Copy & Paste.
To read and learn more about ProBackTesting:
https://www.prorealcode.com/blog/debugging-probuilder-graph-instruction/
https://www.prorealcode.com/blog/video-tutorials/tick-tick-backtest-engine-probacktest/
https://www.prorealcode.com/blog/learning/prorealtime-walk-analysis-tool/
01/19/2019 at 7:53 PM #89120In your code, Where does it say wich index to buy?
And if I want to have a trailing stop loss 0,5 instead of regular stop loss, and I want the volume to be low, how can I code that?
-
AuthorPosts
Find exclusive trading pro-tools on