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 ExitShort
When 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.
Hi GraHal
I wonder if you get chance to look at my above request.
Look forward hearing from you.
Thanks.
Hi GraHal
Thanks for your guidance.
Sorry earlier I checked on first page & hence replied you. Let me check your above reply & revert to you.
Thanks.
Hi
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.
My 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 …
If Time = 143000 Then
Buy 1 Contract at Market
Endif
- Select TF on your Platform.
-
If Intradaybarindex[5] > Close[1] Then
Buy 1 Contract at Market
Endif
3. Define MyStop then use
If Close = MyStop or Time = 203000 Then
Sell at Market
Endif
Ha below is rubbish as an answer to Item 2 above
If Intradaybarindex[5] > Close[1] Then
Buy 1 Contract at Market
Endif
It should be … ??
If Intradaybarindex[5] > Day[1]Close Then
Buy 1 Contract at Market
Endif