How Do i Draw ellipse
Forums › ProRealTime English forum › ProBuilder support › How Do i Draw ellipse
- This topic has 6 replies, 2 voices, and was last updated 7 years ago by CHIFHE.
-
-
07/04/2017 at 11:44 AM #3977407/04/2017 at 1:03 PM #39782
You meant “ellipse”? 😆
To draw a circle (an ellipse), you need 2 set of coordinates, just like you would draw a rectangle for instance: DRAWELLIPSE
What do you want to have inside the ellipse please?
07/04/2017 at 3:03 PM #39796Yes, Ellipse, inside ellipse there must be Candle for that a period. like for example instead of putting buy signal then there must be ellipse. I have attached example with buy or sell signal. instead of those buy and sell signal I need to replace it with ellipse to show me that my startergy is activated once the candle closes then the trade will be placed.
07/04/2017 at 3:20 PM #39798I copy/paste your document here:
Description
Long signal (buy)
When cycle cross over value 0 then buy signal activated. When CCI cross over 100 then is over bought exit the trade.
Short Signal (Sell)
When cycle cross under value 0 then sell signal activated and when CCI cross under -100 is oversold exit the trade.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159// Conditions to enter long positionsindicator1 = Cycle(close)c1 = (indicator1 CROSSES OVER 0)IF c1 THENDRAWARROWUP(barindex, low*0.999) coloured (0,255,255)DRAWTEXT("BUY", barindex, LOW*0.992,SansSerif,Bold,12)coloured(0,255,255)ENDIF// Conditions to exit long positionsindicator2 = CCI[20]c2 = (indicator2 CROSSES OVER 100)IF c2 THENENDIF// Conditions to enter short positionsindicator3 = Cycle(close)c3 = (indicator3 CROSSES UNDER 0)IF c3 THENDRAWARROWDOWN(barindex, HIGH*1.001) coloured (128,0,128)DRAWTEXT("SELL", barindex, HIGH*1.008,SansSerif,Bold,12)coloured(128,0,128)ENDIF// Conditions to exit short positionsindicator4 = CCI[20]c4 = (indicator4 CROSSES UNDER -100)IF c4 THENENDIF//Inside Bar Breakout Failure indicatorbullcandle=open<closebearcandle=open>closeinsidebarbear= bearcandle and high[0]<high[1] and low[0]>low[1]if insidebarbear thenDRAWTEXT("↓", barindex, high[1], Dialog, ITALIC,10) COLOURED(147,112,219)//DRAWARROWDOWN(barindex,high[1]) COLOURED(0,0,0)DRAWCANDLE(open,high,low,close) COLOURED(0,0,0) BORDERCOLOR(255,0,0)endifinsidebarbull= bullcandle and high[0]<high[1] and low[0]>low[1]if insidebarbull thenDRAWTEXT("↑", barindex, high[1], Dialog,ITALIC, 10) COLOURED(147,112,219)//DRAWARROWDOWN(barindex,high[1]) COLOURED(0,0,0)DRAWCANDLE(open,high,low,close) COLOURED(0,0,0) BORDERCOLOR(0,255,0)endifinsidebarFailureBull=bullcandle and (low[1]<Low[0] or high[1]>high[0]) and(insidebarbull[1] and close[0]<close[1] and close[0]>open[1]) or insidebarbear[1] and close[0]<open[1] and close[0]>close[1] //if insidebarFailureBull and not (insidebarbear or insidebarbull) thenDRAWTEXT("¬", barindex, high[1], Dialog,ITALIC, 10) COLOURED(147,112,219)DRAWCANDLE(open,high,low,close) COLOURED(255,255,255) BORDERCOLOR(0,255,0)//DRAWARROWUP(barindex,low[0]) COLOURED(0,255,0)endif//================insidebarFailureBear=bearcandle and (low[1]<Low[0] or high[1]>high[0]) and(insidebarbear[1] and close[0]>close[1] and close[0]<open[1]) or insidebarbull[1] and close[0]>open[1] and close[0]<close[1]if insidebarFailureBear and not (insidebarbear or insidebarbull) thenDRAWTEXT("∟", barindex, high[1], Dialog,ITALIC, 10) COLOURED(147,112,219)DRAWCANDLE(open,high,low,close) COLOURED(255,255,255) BORDERCOLOR(255,0,0)//DRAWARROWUP(barindex,low[0]) COLOURED(255,0,0)endifRETURNI attached the example of what the code is doing right now, could you please tell me what signals should be replace by an ellipse now? There are many different things already plotted, that’s why I asked to be sure 🙂 Thanks.
07/05/2017 at 8:26 AM #3984007/05/2017 at 9:28 AM #39844Ok, so I replaced the “buy” and “sell” text with ellipse including the candlesticks that generate the signals. They are drawn 1 bar after the signal, because to include correctly the candlestick into the circle, we need to start to draw it before the bar and end after it.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154// Conditions to enter long positionsindicator1 = Cycle(close)c1 = (indicator1 CROSSES OVER 0)IF c1 THENDRAWARROWUP(barindex, low*0.999) coloured (0,255,255)//DRAWTEXT("BUY", barindex, LOW*0.992,SansSerif,Bold,12)coloured(0,255,255)ENDIFif c1[1] thenDRAWELLIPSE(barindex[2], low[1], barindex, high[1])coloured(0,255,255)endif// Conditions to exit long positionsindicator2 = CCI[20]c2 = (indicator2 CROSSES OVER 100)IF c2 THENENDIF// Conditions to enter short positionsindicator3 = Cycle(close)c3 = (indicator3 CROSSES UNDER 0)IF c3 THENDRAWARROWDOWN(barindex, HIGH*1.001) coloured (128,0,128)//DRAWTEXT("SELL", barindex, HIGH*1.008,SansSerif,Bold,12)coloured(128,0,128)ENDIFif c3[1] thenDRAWELLIPSE(barindex[2], low[1], barindex, high[1])coloured(128,0,128)endif// Conditions to exit short positionsindicator4 = CCI[20]c4 = (indicator4 CROSSES UNDER -100)IF c4 THENENDIF//Inside Bar Breakout Failure indicatorbullcandle=open<closebearcandle=open>closeinsidebarbear= bearcandle and high[0]<high[1] and low[0]>low[1]if insidebarbear thenDRAWTEXT("↓", barindex, high[1], Dialog, ITALIC,10) COLOURED(147,112,219)//DRAWARROWDOWN(barindex,high[1]) COLOURED(0,0,0)DRAWCANDLE(open,high,low,close) COLOURED(0,0,0) BORDERCOLOR(255,0,0)endifinsidebarbull= bullcandle and high[0]<high[1] and low[0]>low[1]if insidebarbull thenDRAWTEXT("↑", barindex, high[1], Dialog,ITALIC, 10) COLOURED(147,112,219)//DRAWARROWDOWN(barindex,high[1]) COLOURED(0,0,0)DRAWCANDLE(open,high,low,close) COLOURED(0,0,0) BORDERCOLOR(0,255,0)endifinsidebarFailureBull=bullcandle and (low[1]<Low[0] or high[1]>high[0]) and(insidebarbull[1] and close[0]<close[1] and close[0]>open[1]) or insidebarbear[1] and close[0]<open[1] and close[0]>close[1] //if insidebarFailureBull and not (insidebarbear or insidebarbull) thenDRAWTEXT("¬", barindex, high[1], Dialog,ITALIC, 10) COLOURED(147,112,219)DRAWCANDLE(open,high,low,close) COLOURED(255,255,255) BORDERCOLOR(0,255,0)//DRAWARROWUP(barindex,low[0]) COLOURED(0,255,0)endif//================insidebarFailureBear=bearcandle and (low[1]<Low[0] or high[1]>high[0]) and(insidebarbear[1] and close[0]>close[1] and close[0]<open[1]) or insidebarbull[1] and close[0]>open[1] and close[0]<close[1]if insidebarFailureBear and not (insidebarbear or insidebarbull) thenDRAWTEXT("∟", barindex, high[1], Dialog,ITALIC, 10) COLOURED(147,112,219)DRAWCANDLE(open,high,low,close) COLOURED(255,255,255) BORDERCOLOR(255,0,0)//DRAWARROWUP(barindex,low[0]) COLOURED(255,0,0)endifRETURN07/05/2017 at 12:22 PM #39870 -
AuthorPosts
Find exclusive trading pro-tools on