Limited risk account question about trailing stop
Forums › ProRealTime English forum › ProOrder support › Limited risk account question about trailing stop
- This topic has 10 replies, 3 voices, and was last updated 7 years ago by Frytconcord.
-
-
10/10/2017 at 10:23 AM #48888Hello Nicolasis it possible that this code FBS EUR/USD “ALE – KASPER reinvestement” works with a limited risk account? Because there is the function “TRAILING STOP” can you explain to me ? thank you in advance.123456789101112131415161718192021222324//TRAILING STOPTGL =5TGS=5if not onmarket thenMAXPRICE = 0MINPRICE = closePREZZOUSCITA = 0ENDIFif longonmarket thenMAXPRICE = MAX(MAXPRICE,close)if MAXPRICE-tradeprice(1)>=TGL*pointsize thenPREZZOUSCITA = MAXPRICE-TGL*pointsizeENDIFENDIFif shortonmarket thenMINPRICE = MIN(MINPRICE,close)if tradeprice(1)-MINPRICE>=TGS*pointsize thenPREZZOUSCITA = MINPRICE+TGS*pointsizeENDIFENDIFif onmarket and PREZZOUSCITA>0 thenEXITSHORT AT PREZZOUSCITA STOPSELL AT PREZZOUSCITA STOPENDIF10/10/2017 at 12:14 PM #48900
Bonjour Frytconcord et bienvenue sur les forums de PRC, ayant des forums divisés par langues, puis par sous-thèmes, la coutume dans les forums PRC est de parler la langue du forum où on poste, merci de rester en Français sur le présent forum, et de réserver l’Anglais pour les forums PRC anglais.
Aussi, j’édite ton message pour mettre le listing du code au bon format, mais merci pour les prochains messages d’utiliser le bouton <> dans la barre d’outil de l’éditeur de messages pour insérer du code au format PRT.
Hello Frytconcord and welcome to the forums of PRC, having forums divided by languages, then by sub-topics, the custom in forums PRC is to speak the language of the forum where we post, thank you for staying in French on this forum, and reserve English for the English PRC forums.
Also, I’m editing your message to put the code listing in the correct format, but thanks for future messages to use the <> button on the message editor toolbar to insert code in PRT format.
1 user thanked author for this post.
10/10/2017 at 2:40 PM #48923Thank you for respecting some classic rules: posting in the right place and in the right language! This allows me and the moderators to focus on the answers rather than the household! 👿
Now, about your question, this ‘trailing stop’ function is not the “SET STOP TRAILING” instruction of the programming language, it simulates it, so it can be used in limited risk account with these limitations:
The minimum stop distances are greater than the “Expert” accounts (current normal account), the information of this distance can be found in the instrument’s manual trading information (expressed in points or percentage for shares). Since the trailing stop will not work, the SET STOP TRAILING instruction will be inoperative, so I advise you to use the coded trailing stop you find in the blog part of the site (many strategies already use it in the code library ). The stoploss can be far from the entry price, far enough, but you have to take into account your margin required to place it (of course you can not lose more than the size of your cash account, so be vigilant at level of the stoploss).
10/10/2017 at 3:59 PM #48945Oh! sorry I did not understand the forum. Sorry
“The minimum stop distances are greater than the “Expert” accounts (current normal account), the information of this distance can be found in the instrument’s manual trading information”
or find this information?
if I understand correctly it will work you who has it? I do not need to modify it for this:
https://www.prorealcode.com/topic/updated-version-of-trailing-sl/#post-44305
10/10/2017 at 4:35 PM #48955sorry, but do you the code trailing stop? I found a lot in the library all different ! Thank you
10/10/2017 at 5:04 PM #48960@Nicolas
“The minimum stop distances are greater than the “Expert” accounts (current normal account), the information of this distance can be found in the instrument’s manual trading information (expressed in points or percentage for shares). Since the trailing stop will not work, the SET STOP TRAILING instruction will be inoperative, so I advise you to use the coded trailing stop you find in the blog part of the site (many strategies already use it in the code library ). The stoploss can be far from the entry price, far enough, but you have to take into account your margin required to place it (of course you can not lose more than the size of your cash account, so be vigilant at level of the stoploss).”Oh! sorry I did not understand the functioning of the forum. sorry
I find but I can not find any information. Or find this information?If I understand correctly, I do not need to change the code?
Or should I add that:https://www.prorealcode.com/topic/updated-version-of-trailing-sl/#post-44305
thanks for your understanding
10/10/2017 at 9:32 PM #48990Should i use this code ?
10/10/2017 at 9:33 PM #48992for a limited risk account12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758defparam cumulateorders = false//order launch (example) would be set to any other entry conditions//c1 = close>close[1]c2 = close<close[1]//if c1 then//BUY 1 LOT AT MARKET//SET STOP PLOSS 50//endifif c2 thenSELLSHORT 1 LOT AT MARKETSET STOP PLOSS 50endif//************************************************************************//trailing stop functiontrailingstart = 20 //trailing will start @trailinstart points profittrailingstep = 5 //trailing step to move the "stoploss"//reset the stoploss valueIF NOT ONMARKET THENnewSL=0ENDIF//manage long positionsIF LONGONMARKET THEN//first move (breakeven)IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THENnewSL = tradeprice(1)+trailingstep*pipsizeENDIF//next movesIF newSL>0 AND close-newSL>=trailingstep*pipsize THENnewSL = newSL+trailingstep*pipsizeENDIFENDIF//manage short positionsIF SHORTONMARKET THEN//first move (breakeven)IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THENnewSL = tradeprice(1)-trailingstep*pipsizeENDIF//next movesIF newSL>0 AND newSL-close>=trailingstep*pipsize THENnewSL = newSL-trailingstep*pipsizeENDIFENDIF//stop order to exit the positionsIF newSL>0 THENSELL AT newSL STOPEXITSHORT AT newSL STOPENDIF//************************************************************************GRAPH newSL as "trailing"10/11/2017 at 8:31 AM #4900310/11/2017 at 9:17 AM #49008thanks for your response nicolas. just a small question. the stop at 50 is far enough away for you? otherwise I use the trailing stop with parameters 9 and 10 see below
10/11/2017 at 9:18 AM #49009123//trailing stop functiontrailingstart = 9 //trailing will start @trailinstart points profittrailingstep = 10 //trailing step to move the "stoploss" -
AuthorPosts
Find exclusive trading pro-tools on