Code : Basic building Blocks
Forums › ProRealTime English forum › ProOrder support › Code : Basic building Blocks
- This topic has 21 replies, 3 voices, and was last updated 7 years ago by
GraHal.
-
-
03/15/2018 at 8:44 PM #65390
If you number your paragraphs then my answers can show same numbers … might make it easier for you to follow my answers?
Code is executed at end of each bar so only 1, 2, 5 or 10 mins will align with the Time 091000.
I think Daily bars open at 000000 + millisecinds, but you need to to research more as I may be wrong.
Use GRAPH Function and then run your Strategy and you should see what time Daily bar opens?
You would need to post your code on here then we can see what issues there may be.
This may help, look them under Help, documentation at the top of the Page …
To go Long use Buy
To exit Long use Sell
To go Short use SellShort
To exit Short use ExitShort03/15/2018 at 9:07 PM #65392When a daily bar opens/closes depends on the market. You have to check individually. Especially commodities have sometimes strange trading hours. For example chicago wheat trades 01:00-18:20 london time.
1 user thanked author for this post.
03/20/2018 at 6:14 PM #6589103/20/2018 at 6:17 PM #6589204/06/2018 at 8:00 AM #67395Hi
I checked & noticed that we program execute buy or sell order during opening of bar & not closing of bar. Up course effect will be same. Since price at closing of bar & opening of next bar will be almost same. So we need to select time accordingly. Example, if we want to buy at 14.30 on 30 minutes timeframe then you need to mention time as 15.00 in the program so that order for buy will be executed during opening of 15.00 to 15.20 bar.
Please correct me if I am wrong.
Can I have simple code for following requirement from you expert people.
- Time frame any (Minutes – 10, 15, 30, Hrs – 1, 2 etc)
- Buy if open of intraday bar number 5 is > then close of intraday bar of previous day
- Sell as per stop loss or when time is 20.30
Thanks.
04/07/2018 at 12:03 PM #67484My brain is not working right due to overwork / 10 hours barrowing muck away (into skips) after excavations for my daughters extension to her house, but to keep the momentum up …
123If Time = 143000 ThenBuy 1 Contract at MarketEndif- Select TF on your Platform.
-
123If Intradaybarindex[5] > Close[1] ThenBuy 1 Contract at MarketEndif
3. Define MyStop then use
123If Close = MyStop or Time = 203000 ThenSell at MarketEndif
04/07/2018 at 12:27 PM #67488 -
AuthorPosts
Find exclusive trading pro-tools on