Jump to content

⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

Recommended Posts

Posted

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);

Posted
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

×
×
  • Create New...