Time conditioned trading
Forums › ProRealTime English forum › ProOrder support › Time conditioned trading
- This topic has 20 replies, 7 voices, and was last updated 4 years ago by
GraHal.
-
-
06/01/2021 at 12:10 PM #17090406/01/2021 at 1:57 PM #170910
There you go:
1234567891011121314151617DEFPARAM CumulateOrders = True//Timeframe(Daily,UpdateOnClose)IF Not OnMarket THENTradeON = 1Count = 0ELSECount = Count + 1IF Count > 2 THENTradeON = 0ENDIFENDIF//Timeframe(1h,UpdateOnClose)IF TradeON THEN //you may want to add other entry conditionsBUY 100 CONTRACTS AT MARKETENDIFbear in mind that 48 hours * 100 is 4800 contracts, which could be way more than allowed (ProOrder allows no more than 999 contracts, but IG could allow less than that).
2 users thanked author for this post.
06/01/2021 at 2:04 PM #170912Thank you so much, Robert.
Is there any other codes or methods regarding this that you would recommend, please? Similar threads regarding this (I was not able to find similar posts, however this should be something that is frequently requested?)?
Regarding
06/01/2021 at 2:43 PM #170913I have no memory of other posts on this topic.
Another way could be to count how many 1-hour have passed since a trade was entered and stop countind (and entering) when 48 is reached.
Doing date and time math calculations is a bit more complicated because there’s no built-in functions, this could be an alternative way:
123456789101112131415161718192021DEFPARAM CumulateOrders = True//Timeframe(1h,UpdateOnClose)IF Not OnMarket THENTradeON = 1DayCount = 0MyTime = 0ELSEIF MyTime = 0 THENMyTime = OpenTimeENDIFIF IntraDayBarIndex = 0 THENDayCount = DayCount + 1ENDIFENDIFIF OnMarket AND (DayCount = 2) AND (OpenTime = MyTime) THENTradeON = 0ENDIFIF TradeON THEN //you may want to add other entry conditionsBUY 100 CONTRACTS AT MARKETENDIF06/01/2021 at 3:32 PM #17091406/01/2021 at 5:32 PM #170920You can use Mini contracts worth €1 each (EURUSD Mini, etc…, which is ten times less.
06/01/2021 at 5:49 PM #17092406/01/2021 at 8:10 PM #170932The EURUSD mini is 1$ per point increase in price.
What value you wanting to trade?
Try US500, 1 Contract at 4200 ish?
I’m smiling because in your original post you mentioned buying 100 Contracts every hour! I thought … WOW the big boys are joining us little fishers!!!!! 🙂
06/01/2021 at 11:23 PM #17093706/01/2021 at 11:39 PM #170940As far as I can tell, one contract of EUR/USD = 100.000 euros, hence ~ USD 120.000. The Mini is 1/10th of that indeed. However, you can buy fractions of a contract like 0.1 Mini contract.
I don’t know about a minimum.Do notice that this is IG. For IBKR there is a hard minimum of USD 20.000. I recall vaguely that even that can be less by means of using special Exchanges. But you can’t address those via PRT (you can via Trader Workstation). Don’t pin me down on this.
06/01/2021 at 11:48 PM #170941Dear, Peter
I didn’t know about the fraction. I am so happy about this information. Seeing now that 0.01 is possible.
Do you guys have any recommendations regarding the code, please? Any inputs on the method
I would like to arrange for multiple orders regarding a currency hedge. This is seems reasonable, guys?
06/02/2021 at 12:09 AM #17094206/02/2021 at 7:51 AM #170946Are you talking CFD?
On DJI I think 0.5 is minimum on CFD.
In the UK we use SB – Spread bet and the min on DJI is 0.2.
Easiest way to find min (for any instrument) is to enter what you would like to trade in the manual trading positions size box and when it turns red you know you have gone too low.
06/02/2021 at 8:52 AM #170953How come it is not like this here?
CFD = Contracts for Difference, so 1 contract = the value of the price change per point (or pip). I think perhaps you are confusing this with the underlying nominal value – which is still an important consideration, but because it is a leveraged product, each contract costs only a fraction of that, probably 5%. That is the margin, ie how much capital it costs you to make the trade.
As for the strategy, it seems to be lacking any theoretical basis, or at least some technical measure of the overall price movement (trend). To buy repeatedly on the hour, either you assume the instrument is in a persistent up-trend – in which case I want to know why you would assume that? or if it’s falling, you want to continually average your position down for when it turns the corner … in which case I’m thinking, why not just wait for it to turn up and then buy?
You might at least try adding a moving average filter … and then you would probably want a stoploss and a target, maybe a trailing stop. Lots of things to play around with, see what works.
06/04/2021 at 2:36 PM #171149 -
AuthorPosts
Find exclusive trading pro-tools on