LonelyTrade Posted November 23, 2014 Report Share Posted November 23, 2014 Hi Again, Can a good sould here help us by transforming this TS Code into NT Code, this indicator is for scalping even with 1 tick charts. some one please!!! Thank you! The code is: {Scalper Buys and Sells 7/18/2007 Written by Luis Gomez inspired by John Carters "Mastering the Trade" } inputs: buyColor(white), sellColor(blue), width(3); variables: highBarsAgo(1), possibleHighBarsAgo(1), possibleHigh(-2), hightoBeat(-1), barsSincePaint(1), lowBarsAgo(1), possibleLowBarsAgo(1), possibleLow(10000001), lowtoBeat(10000000), triggerPriceSell(-1), triggerPriceBuy(1000000), trend(1), _UP(1), _DOWN(-1), _ON(1), _OFF(-1); //************************* ************************* * //****** Find and plot the highest swing high ******* //************************* ************************* * if trend = _UP then begin if swingHighBar(1,H,2,barsSi ncePaint+2) > -1 then begin possibleHighBarsAgo = swingHighBar(1,H,2,barsSi ncePaint+2); possibleHigh = H[possibleHighBarsAgo]; end; if possibleHigh >= hightoBeat then begin highBarsAgo = possibleHighBarsAgo; hightoBeat = possibleHigh; triggerPriceSell = L[HighBarsAgo - 1]; end; if C < triggerPriceSell and highest(high,highBarsAgo) < hightoBeat then begin plotpb[highBarsAgo](H[highBarsAgo],L[highBarsAgo],"",sellColor); alert("Scalper Sell"); trend = _DOWN; barsSincePaint = highBarsAgo-1; hightoBeat = -1; lowtoBeat = 10000000; triggerPriceBuy = 10000000; triggerPriceSell = -1; highBarsAgo = 1; possibleHigh = -2; end; end; //************************* ************************* * //****** Find and plot the lowest swing low ********* //************************* ************************* * if trend = _DOWN then begin if swingLowBar(1,L,2,barsSin cePaint+2) > -1 then begin possibleLowBarsAgo = swingLowBar(1,L,2,barsSin cePaint+2); possibleLow = L[possibleLowBarsAgo]; end; if possibleLow <= lowtoBeat then begin lowBarsAgo = possibleLowBarsAgo; lowtoBeat = possibleLow; triggerPriceBuy = H[LowBarsAgo - 1]; end; if C > triggerPriceBuy and lowest(L,lowBarsAgo) > lowtoBeat then begin plotpb[lowBarsAgo](H[lowBarsAgo],L[lowBarsAgo],"",buyColor); alert("Scalper Buy"); trend = _UP; barsSincePaint = lowBarsAgo-1; possibleLow = 10000001; lowtoBeat = 10000000; hightoBeat = -1; triggerPriceBuy = 10000000; triggerPriceSell = -1; lowBarsAgo = 1; end; end; barsSincePaint = barsSincePaint+1; if trend = _UP then highBarsAgo = highBarsAgo + 1; if trend = _DOWN then lowBarsAgo = lowBarsAgo + 1; setPlotWidth(1,width); Quote Link to comment Share on other sites More sharing options...
gallant Posted November 24, 2014 Report Share Posted November 24, 2014 Hello, search for "TTM Scalp" looks similar ! Quote Link to comment Share on other sites More sharing options...
thedriver Posted November 24, 2014 Report Share Posted November 24, 2014 Hi Again, Can a good sould here help us by transforming this TS Code into NT Code, this indicator is for scalping even with 1 tick charts. some one please!!! Thank you! The code is: {Scalper Buys and Sells 7/18/2007 Written by Luis Gomez inspired by John Carters "Mastering the Trade" } inputs: buyColor(white), sellColor(blue), width(3); variables: highBarsAgo(1), possibleHighBarsAgo(1), possibleHigh(-2), hightoBeat(-1), barsSincePaint(1), lowBarsAgo(1), possibleLowBarsAgo(1), possibleLow(10000001), lowtoBeat(10000000), triggerPriceSell(-1), triggerPriceBuy(1000000), trend(1), _UP(1), _DOWN(-1), _ON(1), _OFF(-1); //************************* ************************* * //****** Find and plot the highest swing high ******* //************************* ************************* * if trend = _UP then begin if swingHighBar(1,H,2,barsSi ncePaint+2) > -1 then begin possibleHighBarsAgo = swingHighBar(1,H,2,barsSi ncePaint+2); possibleHigh = H[possibleHighBarsAgo]; end; if possibleHigh >= hightoBeat then begin highBarsAgo = possibleHighBarsAgo; hightoBeat = possibleHigh; triggerPriceSell = L[HighBarsAgo - 1]; end; if C < triggerPriceSell and highest(high,highBarsAgo) < hightoBeat then begin plotpb[highBarsAgo](H[highBarsAgo],L[highBarsAgo],"",sellColor); alert("Scalper Sell"); trend = _DOWN; barsSincePaint = highBarsAgo-1; hightoBeat = -1; lowtoBeat = 10000000; triggerPriceBuy = 10000000; triggerPriceSell = -1; highBarsAgo = 1; possibleHigh = -2; end; end; //************************* ************************* * //****** Find and plot the lowest swing low ********* //************************* ************************* * if trend = _DOWN then begin if swingLowBar(1,L,2,barsSin cePaint+2) > -1 then begin possibleLowBarsAgo = swingLowBar(1,L,2,barsSin cePaint+2); possibleLow = L[possibleLowBarsAgo]; end; if possibleLow <= lowtoBeat then begin lowBarsAgo = possibleLowBarsAgo; lowtoBeat = possibleLow; triggerPriceBuy = H[LowBarsAgo - 1]; end; if C > triggerPriceBuy and lowest(L,lowBarsAgo) > lowtoBeat then begin plotpb[lowBarsAgo](H[lowBarsAgo],L[lowBarsAgo],"",buyColor); alert("Scalper Buy"); trend = _UP; barsSincePaint = lowBarsAgo-1; possibleLow = 10000001; lowtoBeat = 10000000; hightoBeat = -1; triggerPriceBuy = 10000000; triggerPriceSell = -1; lowBarsAgo = 1; end; end; barsSincePaint = barsSincePaint+1; if trend = _UP then highBarsAgo = highBarsAgo + 1; if trend = _DOWN then lowBarsAgo = lowBarsAgo + 1; setPlotWidth(1,width); Hi try with this https://www.sendspace.com/file/9okx76 copy the cs. file in your C:\Users\...\Documents\NinjaTrader 7\bin\Custom\Indicator and compile it enjoy regards LonelyTrade, Ganymed, ⭐ laser1000it and 2 others 5 Quote Link to comment Share on other sites More sharing options...
⭐ laser1000it Posted November 25, 2014 Report Share Posted November 25, 2014 Hi, any tutorial or setting for this issue ? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.