Set stop loss x trailing y // Code “manuel”
Forums › ProRealTime forum Français › Support ProOrder › Set stop loss x trailing y // Code “manuel”
- This topic has 3 replies, 4 voices, and was last updated 1 year ago by GraHal.
Tagged: trailing stop
Viewing 4 posts - 1 through 4 (of 4 total)
-
-
02/20/2021 at 12:25 AM #16207404/06/2021 at 3:58 PM #166298
Tu peux essayer avec ce type de trailing stop (“IG style”) pour obtenir un tant soit peu le même fonctionnement que celui d’IG, attention toutefois, les niveaux de prix se recalculent uniquement une seule fois à chaque bougie :
1234567891011121314151617181920212223242526StopLoss = 10 //StopLoss sizeTrailingStopStart = 0 //Trailing Stop start at X points in profitbuystoploss = close-StopLoss*pointsizesellstoploss = close+StopLoss*pointsizeif not onmarket thenibuystoploss=buystoplossisellstoploss=sellstoplossendifif longonmarket then//checking and adjusting stoplossif close-tradeprice>=trailingstopstart*pointsize thenibuystoploss = max(ibuystoploss,high-(stoploss+trailingstopstart)*pointsize)endif//set the stoploss levelsell at ibuystoploss stopendifif shortonmarket then//checking and adjusting stoplossif tradeprice-close>=trailingstopstart*pointsize thenisellstoploss = min(isellstoploss,low+(stoploss+trailingstopstart)*pointsize)endif//set the stoploss levelexitshort at isellstoploss stopendif04/22/2023 at 12:09 AM #213594Pourquoi le coder en manuel ? Le code ne fonctionne pas Chez IG ?
1Set stop ploss x ptrailing y04/22/2023 at 12:13 PM #2136021. Set stop ploss x
2. Réglez l’arrêt de la traînée y
- sur ses propres travaux.
- sur ses propres œuvres
Mais 1. et 2. ne fonctionnent pas ensemble, la dernière commande annule tout ce qui se trouve sur la ligne précédente ou sur la même ligne.
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
Find exclusive trading pro-tools on
Similar topics:
Est-ce qu’il serait possible de trouver une façon de coder en manuel le code suivant
En l’occurence x = 27 et y = 5. Il ne peut en effet pas “tourner” en réel. J’ai essayé à partir de ce qui a déjà été fourni dans d’autres topics pour reproduire le trailing stop, sans succès.
Merci beaucoup pour votre aide.