EURUSD Mini / Maximum Shares
Forums › ProRealTime English forum › ProOrder support › EURUSD Mini / Maximum Shares
- This topic has 10 replies, 3 voices, and was last updated 1 year ago by robertogozzi.
-
-
03/21/2023 at 9:44 AM #211860
Hi,
I have a question about the initial capital and maximum share we can buy, let me explain first :
I want to buy EUR/USD Mini so the size of one contrat (0,1 Lot) is 10 000 USD and with IG and EMSA low I need only 333 USD (10 000 / 30 = 333 that is the margin I need to open one a position of 0,1 Lot), and my initial capital is 1000$ as you can see on the picture below, so noamaly I can open maximum a position with 0,3 (1000$ / 333$ = 3)
the question is : Why if I put in the code BUY 5 contract it’s steel working ? so the PRT software don’t care about margin and I have to calculate if by myself ? or they have other think I don’t understand ?
that is the code :
1234567891011121314151617DEFPARAM CumulateOrders = falsedefparam preloadbars = 2000EMA20 = ExponentialAverage[20](Close)EMA50 = ExponentialAverage[50](Close)IF EMA20 Crosses Over EMA50 ThenBullON = 1ELSEBullON = 0ENDIFIF NOT LongOnMarket AND BullON THENBUY 5 CONTRACTS AT MARKETSET STOP LOSS 20 * pipsizeSET STOP TRAILING 60ENDIFBest Reguards,
ZeroCafeine03/21/2023 at 10:17 AM #211863Why if I put in the code BUY 5 contract it’s steel working
Above on Demo Account right?
If you do above on Live Account with only 1000 in Account then you will get Rejected due to “insufficient Funds”
1 user thanked author for this post.
03/21/2023 at 11:34 AM #211869ok ok, tks you @GraHal,
I’m on the real account but disconnected and doing backtesting, So when I will do it for real it’s will be rejected right ?, maybe it’s better to calculate de equity in my algorithme,
someone can tell me pls why my Stop Loss and my Traling stop is not working ?
12SET STOP LOSS 20 * pipsizeSET STOP TRAILING 6003/21/2023 at 11:52 AM #21187012SET STOP pLOSS 20 * pipsize //add pSET STOP pTRAILING 60 //p for pointsit’s will be rejected right
1Rejection will occur when conditions are true and a trade tries to execute.03/21/2023 at 7:04 PM #211888in case of two different STOP orders, the last one, sequentially, will always override the previous one. In your case only SET STOP pTRAILING 60 will be executed, but… as it’s incorrectly written, you won’t have any kind of STOP LOSS. It’s quite unlikely that EURUSD may reach +-60.xxxx, because you didn’t use the PIPSIZE conversion.
Use
1SET STOP pTRAILING 60 * PipSize2 users thanked author for this post.
03/22/2023 at 10:12 AM #211916tks you @robertogozzi,
Thank you very much, you have answered two of my questions at the same time,
So if I understand correctly I have to place a stop loss first, then I have to create a condition that creates a trading stop once the price has exceeded 60 pips
12345678910IF C1 ThenSET STOP pLOSS 20 * pipsizeSLONOFF = 1ELSESLONOFF = 0ENDIFIF SLONOFF AND C2 ThenSET STOP pTRAILING 60 * pipsizeENDIFalso I have a small question in Forex, for exemple at 1,07015 if I add “60 * pipsize” :
1,07015 + (60 * pipsize) = 1,07615 and not 1,07075 ? because 60 * pipsize = 0,00600 and Not 0,00060 ?how about for exmple price in € for a share like 35,013, the pipsize is 0,001€ or 0,01€ ?
and tks again for all your light
03/22/2023 at 6:03 PM #211938when I use your code :
1SET STOP pTRAILING 60 * PipSizethe stop loss at 60 pips not working but when I use like this is working for exit at 60pips :
1SET STOP pTRAILING 60tks again, I will try myself with some share and forex and other and come back to this thread
03/22/2023 at 6:08 PM #211939I don’t know what C1 and C2 retain, but it seems correct if the profit is > 60 pips, that’s where the trailing stop starts from, otherwise your stop loss will be disabled and in case of a sudden reversion, your trade will heve NO stop loss.
If you write SET STOP pTRAILING 60 * pipsize after only 30 pips gained, your SL will be disabled, but your trailing stop will only start after another 30 pips are gained. In the meantime you’ll have NO stop loss.
I suggest that you keep your SL and use a code snippet, among the many on the forum, to add a custom trailing stop to your code.
As to the last question, your are right; adding 60 to 1,07015 will make it 61,07015, while adding 60*PipSize to 1,07015, will make it 1,07615 as PIPSIZE will convert 60 into 0.0060. But PIPSIZE is not ALWAYS 1/10000th of the price, it’s 1 with indices, 1/1000th with other fax pirs, etc…
It’s a convenient way to deal with conversions without having to care about what divisor or multiplier has to be used, thus making your code portable to other instruments and assets.
1 user thanked author for this post.
03/22/2023 at 6:10 PM #211940You are right, my fault, the leading “p” in pTRAILING assumes you are using pips without having to convert that number.
1 user thanked author for this post.
03/23/2023 at 3:59 PM #211994tks you @robertogozzi
now I understand for Forex for 60 Pips I have to use p or pipsize then :
123both of this 2 line of code is 60 pipsSET STOP pLOSS 60SET STOP LOSS 60 * pipsizealso when I use Stop Traling with out Stop Loss it’s working like I have a Stop loss, So the Stop Loss get me out at exactely 60 pips but the Stop Traling get me out at an other value, maybe the Stop traling wait for the candle close for execute my order after this candle, that is why I haven’t exactly 60pips (I tryed the chart or 1min and tick by tick but I don’t understand when PRT software execute my order)
that is the code :
12345678910IF NOT LongOnMarket AND BullON THENBUY 1 CONTRACTS AT MARKETSET STOP pLOSS 60ENDIF// it's same of :IF NOT LongOnMarket AND BullON THENBUY 1 CONTRACTS AT MARKETSET STOP pTRAILING 60 // even we don'"t have a Stop pLoss, this Stop Traling do the same jobsENDIF03/23/2023 at 7:30 PM #212014I tested it to know exactly the behaviour of SET STOP pTRAILING 60, (I never used it actually).
It sets a starting Stop Loss at -60 pips, then it raises that stop as the profits grow (the high and low are used, not close, as far as I could understand).
If the price never exceeds TRADEPRICE (the entry price), then the 60-pip SL will be hit; if the price rises above the entry price, instead, it raises the SL pip by pip (probably the count is done when the candle closes, but considering the high and low prices), until the SL is hit (be it in profit or loss).
2 users thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on