Very basic indicator from ninjatrader about candle patterns detection
Forums › ProRealTime English forum › ProBuilder support › Very basic indicator from ninjatrader about candle patterns detection
- This topic has 7 replies, 2 voices, and was last updated 5 years ago by Nicolas.
-
-
03/01/2019 at 11:43 PM #9267003/04/2019 at 1:03 PM #92816
Are these candle-patterns similar to the ones that you asked for in this other topic? https://www.prorealcode.com/topic/4-candlestick-pattern-detection/
If yes, please don’t double post.
Next time you asked for a code conversion, please use the page: Ask for a free code conversion
Next time please speak Italian in the italian forum or post in the English forums..
For your next post, please take time to write a more descriptive topic title.
Please respect some basic rules to give us more time to code than to manage/fix your posts.
03/04/2019 at 2:31 PM #9282203/04/2019 at 3:44 PM #9282503/04/2019 at 4:02 PM #92827Here is the code you requested to be translated from Ninjatrader:
1234567891011121314151617181920212223242526272829303132333435363738// --- settingsMaintainPercentageOfOwnVolume = .50TakeOutPercentageOfPreviousBarsVolume = .50DoesntTradeMoreThanPercentageFromOpen = .20BarMustBeAtLeastThisPercentageOfATR = .85// --- end of settingsresult = 0prevrange=range[1]if((range * MaintainPercentageOfOwnVolume) < (Close[0] - Low[0])) then // maintain 50% of own volumeif(Close[0] > Low[1] + (prevRange * TakeOutPercentageOfPreviousBarsVolume)) then // takes out 50% of previous bars rangeif((Open[0] - Low[0]) < range * DoesntTradeMoreThanPercentageFromOpen) then // doesn't trade more than 20% of own range lower than openresult = 1endifendifendifif((range * MaintainPercentageOfOwnVolume) < (High[0] - Close[0])) then // maintain 50% of own volumeif(Close[0] < High[1] - (prevRange * TakeOutPercentageOfPreviousBarsVolume)) then // takes out 50% of previous bars rangeif((High[0] - Open[0]) < range * DoesntTradeMoreThanPercentageFromOpen)then // doesn't trade more than 20% of own range lower than openresult = -1endifendifendif//final cutif(range < (AverageTrueRange[20](close) * BarMustBeAtLeastThisPercentageOfATR)) thenresult=0endifif result = 1 thendrawcandle(open,high,low,close) coloured(0,0,0) bordercolor(0,255,0)elsif result = -1 thendrawcandle(open,high,low,close) coloured(139,0,0) bordercolor(255,69,0)endifreturnWould be nice to explain how you use it ? Thanks in advance.
03/04/2019 at 4:11 PM #9282903/04/2019 at 4:22 PM #9283003/04/2019 at 4:31 PM #92831 -
AuthorPosts
Find exclusive trading pro-tools on