Message : Remplacez les variables par des valeurs fixes
Forums › ProRealTime forum Français › Support ProOrder › Message : Remplacez les variables par des valeurs fixes
- This topic has 14 replies, 4 voices, and was last updated 4 years ago by Vital.
-
-
06/05/2020 at 12:49 AM #134616
Bonjour à tous,
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111//Source idea: https://www.whselfinvest.nl/nl-nl/trading-platform/gratis-trading-strategie/tradingsysteem/17-ichimoku-tkcDefparam CumulateOrders = false // Cumulating positions deactivated//Defparam flatafter = 164500//VARIABLESonce StartE = 010000 //start time for opening positionsonce StartL = 230000 //ending time for opening positions (only trading in the morning)once N = 1 // initieel aantal contractenOTD = Barindex - TradeIndex(5) > IntradayBarIndex // limits the (opening) trades till 1 per dayonce Spread = 1 //total spread buy and sell, the actual price is always in between !once SL = round(close * 100/10000) //Setting Stop loss //Dynamic for indices// Ichimoku settingsTenkanSen = (highest[S](high)+lowest[S](low))/2 // default setting S = 9KijunSen = (highest[M](high)+lowest[M](low))/2 // default setting M = 26SenkouSpanA = (Tenkansen[M]+Kijunsen[M])/2 // default setting M = 26SenkouSpanB = (highest[L](High[M])+lowest[L](Low[M]))/2 //default setting L = 52// Closing methodes (described for long positions, for short positions exactly the opposite//Method 1 if TenkanSen crosses under the Kijunsen//Method 2 if close closes under the upper side of the Kumo / Cloud, based upon the SenkouSpanA//Method 3 if close closes under the lower side of the Kumo / Cloud, based upon the SenkouSpanBClosingMethod = cm //default is cm = 1//Open LONG BUY conditions (2):// 1: Tenkan Sen crosses over the Kijun Sen AND// 2: Close is within 4 periods after the crossing above the Kumo (cloud), defined as Max(SenkouSpanA, SenkouSpanB) ///Open SHORT SELL conditions (2):// 1: Tenkan Sen crosses under the Kijun Sen AND// 2: Close is within 4 periods after the crossing BELOW the Kumo (cloud), defined as Min(SenkouSpanA, SenkouSpanB) /KumoBorderLong = Max(SenkouSpanA, SenkouSpanB) //KumoBorderShort = Min(SenkouSpanA, SenkouSpanB) ////graph KumoBorderShortIf TenkanSen crosses over KijunSen then // base for counting bars when crossing takes placeCondLong = 1elseCondLong = 0endifIf TenkanSen crosses under KijunSen thenCondShort = 1elseCondShort = 0endif//graph cond1Lif time >= StartE And time <= StartL and OTD and not onmarket thenIF summation[4](CondLong) = 1 and summation[4](CondShort) = 0 and Close > KumoBorderLong then //BUY N shares AT MARKETSET STOP ploss SLendifIF summation[4](CondLong) = 0 and summation[4](CondShort) = 1 and Close < KumoBorderShort THEN //SELLSHORT N shares AT MARKET //short sell conditieSET STOP pLOSS SLendifendif // end purchase conditionsif not onmarket thenPriceExit = 0endifif longonmarket then // 3 Exit strategiesif ClosingMethod = 1 thenIf TenkanSen crosses under KijunSen thensell at marketendifendifif ClosingMethod = 2 thenif close - Spread * 0.5 < KumoBorderShort then //to secure a possible stop for Sell at marketPriceExit = close - Spread * 0.5elsePriceExit = KumoBorderShort // regular STOP for sell at market, set for each trading barendifendifif ClosingMethod = 3 thenif close - Spread * 0.5 < KumoBorderLong then //to secure a possible stop for Sell at marketPriceExit = close - Spread * 0.5elsePriceExit = KumoBorderShort // regular STOP for sell at market, set for each trading barendifendifendifif shortonmarket then //// 3 Exit strategiesif ClosingMethod = 1 thenIf TenkanSen crosses over KijunSen thenexitshort at marketendifendifif ClosingMethod = 2 thenif close + Spread * 0.5 > KumoBorderLong then //to secure a possible stop for Sell at marketPriceExit = close + Spread * 0.5elsePriceExit = KumoBorderLong // regular STOP for EXIT SHORT at market, set for each trading barendifendifif ClosingMethod = 3 thenif close + Spread * 0.5 > KumoBorderShort then //to secure a possible stop for Sell at marketPriceExit = close + Spread * 0.5elsePriceExit = KumoBorderShort // regular STOP for EXIT SHORT at market, set for each trading barendifendifendif//exit on trailing stop price levelsif onmarket and priceexit>0 then //price exit set for each trading barEXITSHORT AT priceexit STOPSELL AT priceexit STOPendif//graph priceexitJe testais ce code et au moment de l’activer ProOrder m’indique “Remplacez les variables par des valeurs fixes” (page initiale du code : https://www.prorealcode.com/prorealtime-trading-strategies/an-ichimoku-strategy/)
Quelles sont les valeurs qui doivent être remplacées (je suis très novice en la matière ^^)
Merci de votre aide.
06/05/2020 at 3:17 AM #13461906/05/2020 at 7:55 AM #134626En effet, l’auteur a introduit des variables à optimiser pour ses backtests. Mais pour passer en réel, ProOrder doit bien entendu quelles sont les valeurs à utiliser pour calculer les indicateurs. Toutes ces valeurs de variables doivent donc être fixes, à lecture du code, il s’agit des variables S,L et M (paramètres de l’ichimoku) et la variable “cm”, soit le mode d’entrée selon l’auteur, tout est décrit dans le code ! 😉
06/05/2020 at 10:23 AM #13467106/05/2020 at 12:21 PM #13470106/05/2020 at 3:13 PM #13472306/05/2020 at 5:45 PM #134761Re, bon je crois que j’avance 😀
J’ai mis un peu au hasard ces valeurs :
12345678910111213141516S =7M = 14L = 55cm = 1// Ichimoku settingsTenkanSen = (highest[S](high)+lowest[S](low))/2 // default setting S = 9KijunSen = (highest[M](high)+lowest[M](low))/2 // default setting M = 26SenkouSpanA = (Tenkansen[M]+Kijunsen[M])/2 // default setting M = 26SenkouSpanB = (highest[L](High[M])+lowest[L](Low[M]))/2 //default setting L = 52// Closing methodes (described for long positions, for short positions exactly the opposite//Method 1 if TenkanSen crosses under the Kijunsen//Method 2 if close closes under the upper side of the Kumo / Cloud, based upon the SenkouSpanA//Method 3 if close closes under the lower side of the Kumo / Cloud, based upon the SenkouSpanBonce ClosingMethod = cm //default is cm = 1Ca a l’air de se lancer. Mais du coup à quoi servent les valeurs M S et L ? 🙂
06/05/2020 at 6:11 PM #13477306/05/2020 at 6:37 PM #13477806/05/2020 at 6:41 PM #134779ci joint ichimoku avec les bonnes valeur
1234567// ichimokuTenkan = (highest[9](high)+lowest[9](low))/2Kijun = (highest[26](high)+lowest[26](low))/2SSpanA = (tenkan[26]+kijun[26])/2SSpanB = (highest[52](high[26])+lowest[52](low[26]))/2FutureSpanA = (tenkan+kijun)/2FutureSpanB = (highest[52](high)+lowest[52](low))/206/05/2020 at 6:58 PM #13478306/05/2020 at 7:12 PM #13478606/07/2020 at 10:51 AM #13497506/07/2020 at 11:45 AM #13499907/20/2020 at 2:17 PM #139687 -
AuthorPosts
Find exclusive trading pro-tools on