STOP/LIMIT Orders with SET STOP LOSS
Forums › ProRealTime English forum › ProOrder support › STOP/LIMIT Orders with SET STOP LOSS
- This topic has 25 replies, 2 voices, and was last updated 2 years ago by xxxsylar90xxx.
Tagged: .
-
-
04/26/2021 at 4:33 PM #168087
Hi, i use yuor indicator but it doesn´t follow the red line, it write this green line over and under the mittle of the Candle.
I try your sistem too but no order will sets. I try adding this also on my working sistem “c4 = open[i] – c3″ and it doesn´t work anymore.
I need a horizontal limit order for 5 bars.
It´s really hard to do.
04/26/2021 at 5:31 PM #168102It’s weird, my code should plot MORE than one “—“, up to 5 if all 5 previous bars are true, while the indicator in your pic always plots one.
I think you should post an example, just text (no pics) even using eXcel, with several candles with their values and WHAT you want to see.
Because you are always talking about 4-5 previous candles, but I’m not sure that’s waht you asked.
If you want ONE signal to be repeated N time, then it’s very simple and requires no loops, just the use of SUMMATION.
But I am awaiting your example before writing something that takes time and is not what you asked for.
05/01/2021 at 9:50 PM #168532Hi, I try to explain it better.
I write an indicator but i wanna do it for an automatic trading sistem also. If an expansion Candle >= 15 pips the indicator Write “—-” in the middle of the next Bar. If the low of the Opened candle after the Candle >= 15 is <= of the middle level where the indicator have write “—-” the indicator is Solved, else it must write “—-” again on the next Bar until the low of the new Opened candle after the Candle >= 15 is <= of the middle level where the indicator have write “—-” the first time. All of this ca be make up to 5 times, if the condition doesnt´t verified after 5 Bars it can be stopped and must wait another Bar >= 15
This is What i write… it work on a bullish bar and on a bearish bar.
C4 not implemented why i´ve no Idea how can i do it123456789101112131415n=1c1 = ( close[n] - open[n] )c2 = c1 >=xc3 = c1/2c4 = low <= open[n] + c3IF c2 thenDRAWTEXT("----",barindex[n-1],open[n]+c3,Dialog,Bold,20) COLOURED(0,255,0,255)endifc12 = (open[n] - close[n])c22 = c12 >=xc32 = c12/2IF c22 THENDRAWTEXT("----",barindex,open+c32,Dialog,Bold,20) COLOURED(0,255,0,255)ENDIFRETURNI made 2 Picture. The automatic trading sistem doesn´t need to set an order stop because the price is always > of the middle of the expansive Bar >= 15 pips.
When the low of the Price go down to the writed “—-” that is an buy order limit, i go on market and doesn´t need placing another Limit Order.
I hope you have understand.
Thank you.
05/01/2021 at 10:45 PM #168538It’s not easy to understand, maybe the italian language would have helped (not anymore now, we can’t change it).
I’ll check it better next monday.
05/02/2021 at 9:17 AM #168548Now I write a new code and it work on the next 5 Bar.
12345678910111213141516171819202122For n=1 to 5 doc1 = ( close[n] - open[n] )nextc2 = c1 >=xc3 = c1/2c4 = low <= open[n] + c3For y=1 to 5 doIF c2 thenDRAWTEXT("----",barindex[y-1],open[4]-c3,Dialog,Bold,20) COLOURED(0,255,0,255)endifnextFor m=1 to 5 doc12 = (open[m] - close[m])nextc22 = c12 >=xc32 = c12/2For z=1 to 5 doIF c22 THENDRAWTEXT("----",barindex[z-1],open[4]+c32,Dialog,Bold,20) COLOURED(0,255,0,255)ENDIFnextRETURNI´m not sure if work when the market is open and after a Candle >= 15 draw only one “—-” on my chart.
This condition c4 = low <= open[n] + c3 (showed in picture) i don´t know if I must do it whit break or another command. I need that if after [n] Bar ( [n]<5) the low of the candle is <= at open[n] + c3 doesnt write “—” to barindex 5 but it stops itself.
Thank you again.
05/02/2021 at 10:30 AM #168554I don´t know how but it is working a little bit now.
working limit order123456789101112DEFPARAM CUMULATEORDERS = falsex= 15For n=0 to 5 doc1 = ( close[n] - open[n] )c2 = c1 >=xIf c2 thenc3 = c1/2endifIF c2 THENBUY 1 CONTRACT AT (open[n]+c3) limitENDIFNEXTIt make an buy order limit and this will not disappear until the low reached the order level, and this also if the condition doesn´t appear after 1 Bar up to 5 Bar, then it stopped. But sometimes place order (see the red X stamp) that i don´t nedd and i don´t unsterdand why it make this.
05/02/2021 at 10:32 AM #168557I could check your code and it uses unneeded iterations and variable c4 is not used.
I think it’s better to start from scratch, provided you post the rules and details of what you want to achieve.
05/02/2021 at 2:02 PM #168579c4 is not used cause I don’t know how to explaine it on the code. =(
I Show you what i mean on This Picture.
Candlestick “0” is >= 15 Pips, then at Cadlestick “1” the sistem must set on buy limit order, on the middle of Candlestick “0”.
Low of Candlestick “1” doesn’t reach the Limit order level. System must go on and Place a limit order on the Candlestick “2”
Low of Candlestick “2” doesn’t reach the Limit order level. System must go on and Place a limit order on the Candlestick “3”
Low of Candlestick “3” reach the Limit order level. We are now long on Market we don´t need to place another order anymore.
The cycle can be stopped.
If The Low Of the Candle After 5 Candlestick doesn´t reached the Order Limit leve ldon´t need to set another Limit Order.I hope that now you can undesrtand my issues.
05/02/2021 at 2:12 PM #168581Here you can see The line of the limit order.
05/02/2021 at 6:08 PM #168606It’s a strategy, why were you talking about an indictor?
This is your strategy (I added TP to exit opened trades) tested on DAX Daily TF:
1234567891011121314151617181920ONCE Entry = 0ONCE Bars = 5 //wait no more than these candles before entryPips = 15 * pipsizeBody = close - openIF (StrategyProfit <> StrategyProfit[1]) OR OnMarket OR (Count >= Bars) THENEntry = 0Cond = 0ENDIFIF Body >= Pips AND Cond = 0 AND Not OnMarket THENIF Entry = 0 THENCond = 1Entry = open + (Body / 2)Count = 0ENDIFENDIFIF Not OnMarket AND Cond = 1 AND Count < 5 THENBUY 1 CONTRACT AT Entry LIMITCount = Count + 1ENDIFSET TARGET %PROFIT 5 //5% profit1 user thanked author for this post.
05/02/2021 at 9:25 PM #168613Thank You!! It work =) I write an indicator first to try to explane what I wanna do. Now I reached my objective.
Thank you again Roberto.
-
AuthorPosts
Find exclusive trading pro-tools on