Free Tradestation Strategy Code!
- Kyle Schultz

- Nov 17, 2022
- 1 min read
Below is the Tradestation Easylanguage Code for a Eurocurrency futures momentum strategy. This is set up on a 2 minute EC on data1 and 30 minute EC data2 chart in Tradestation:
inputs:
iContracts(1),
iProfit(400),
iStop(500),
iPercent1(0.0015),
iPercent2(0.002),
iPercent3(0.004),
iMA(50);
Variables:
Tim(0),
iBars(30),
iADX(30),
iADXLength(20);
If Close/Close[iBars]>(1+iPercent1)
And Close/Close[iBars+iBars]>(1+iPercent2)
And Close/Close[iBars+iBars+iBars]>(1+iPercent3)
And C of Data2>Average(C of Data2, iMA)[1]
And ADX(iADXLength)>iADX
Then Buy ("EC LE") iContracts Contracts Next Bar at Lowest(L,5)[1] Limit;
If Close/Close[iBars]<(1-iPercent1)
And Close/Close[iBars+iBars]<(1-iPercent2)
And Close/Close[iBars+iBars+iBars]<(1-iPercent3)
And C of Data2<Average(C of Data2, iMA)[1]
And ADX(iADXLength)>iADX
Then Sell Short ("EC SE") iContracts Contracts Next Bar at Highest(H,5)[1] Limit;
SetProfitTarget(iProfit*iContracts);
SetStopLoss(iStop*iContracts);

.png)



The article about free Tradestation strategy code explains how trading systems can be built and tested, which made me think about how important logic and reasoning are in decision making. I remember struggling to keep up with multiple subjects, so I used take my online Philosophy class help service to better understand key ideas while staying on track. It helped me think more clearly. This shows how structure and guidance can improve both learning and thinking.
Thanks for sharing with the community. I am able to duplicate your results approximately, but assuming $0 slippage and commissions. I realize limit orders have no slippage, but shouldn't an allowance for slippage of stop orders be made?