How to exit from position
Forums › ProRealTime English forum › ProOrder support › How to exit from position
- This topic has 14 replies, 2 voices, and was last updated 7 years ago by enzo_52.
-
-
06/28/2017 at 2:11 PM #393061234567891011121314151617181920212223242526272829303132333435// Definizione dei parametri del codiceDEFPARAM CumulateOrders = False // Posizioni cumulate disattivateID = high<high[1] and low>low[1]if ID thentest = 1hh = highest[2](high)ll = lowest[2](low)endifif test = 1 thenif time>=110000 and time <=120000 thenBUY 1 SHARE AT hh STOPendifendifif test=1 thenif time>=020000 and time <=050000 thensellshort 1 SHARE AT ll STOPendifendifif longonmarket and time >= 020000 and time<=050000thenSELL AT ll STOPtest = 0endifif shortonmarket and time>=110000 and time<=120000 thenEXITSHORT AT hh STOPtest = 0endif06/28/2017 at 2:14 PM #3930706/28/2017 at 2:43 PM #3931506/29/2017 at 4:47 PM #3942406/29/2017 at 5:01 PM #3942606/30/2017 at 1:01 PM #39481
Hi Nicolas, no , the sell and exitshort signals are with 1 condiction: SELL AT ll STOP , EXITSHORT AT hh STOP, i want that if the price do not touch LL or HH level the trade long or short .stops.
if i am long close at 05 o clock , if i am short close at 12 o clock
i hope i was clear ..
thanks
06/30/2017 at 3:50 PM #39513Hmmm… I think we are lost in translation here 🙂
Ok, so now if you want to exit your long position at 5 o’clock, let’s code it like this:
123if time=050000 and longonmarket thensell at marketendifand do the opposite for your short orders.
06/30/2017 at 6:52 PM #39521sorry for my english..be patient Nicolas :-),
i want that my long position will be close if in 02 to 05 o clock or at condition “LL” or if this condition is not verified i want close my long position at 05 o clock.
the same thing for short position
thanks so much Nicolas
07/01/2017 at 7:57 PM #3956307/03/2017 at 9:19 AM #39645Are you sure your “hh” level is below the current Close? I don’t think that possible. You should look 1 period ago instead, like this:
123456789hh = highest[4](high)if time>=020000 and time<050000 and shortonmarket thenEXITSHORT 1 share AT hh[1] stopendifif shortonmarket and time=050000 thenexitshort at marketendif07/03/2017 at 11:34 AM #39670hh is a condition, if the price do is not go upper the “hh” the trade continue to be short , but anyway at 050000 must be closed.
if the price go is upper the hh between 020000 – 050000 then i want that trade must be closed
i hope to be clear
sorry for my english 🙂
07/03/2017 at 1:06 PM #3968607/03/2017 at 3:42 PM #39707idrn4123456789ID = high<high[1] and low>low[1]rang = rangeNR4 = rang<range[1] and rang<range[2] and rang<range[3]if ID and NR4 thentest = 1hh = highest[4](high)ll = lowest[4](low)endifidrn412345678ID = high<high[1] and low>low[1]rang = rangeNR4 = rang<range[1] and rang<range[2] and rang<range[3]fi= ID and NR4hh = highest[4](high)ll = lowest[4](low)what do is it mean 1st code…and what is the difference ?
07/03/2017 at 3:42 PM #3970807/05/2017 at 10:40 AM #39860 -
AuthorPosts
Find exclusive trading pro-tools on