I have a TradeStation script that I wrote. It's 8 lines of code.
Can someone here help me convert it to an EA on MetaTrader?
Thanks,
Frank
Can someone here help me convert it to an EA on MetaTrader?
Thanks,
Frank
someone who can convert a mt5 indicator to jforex 0 replies
Can someone help me to code this simple EA? 0 replies
Please, can someone help me modify this simple EA? 2 replies
can someone build or help me with a simple indicator? 0 replies
need someone who can convert a mt4 indicator to jforex 5 replies
DislikedSyanwar,
Thanks I really appreciate it. the following is TradeStation code, but the logic is pretty straightforward.
Inputs: avgLength(40), atrLength(40);
Vars: upBand(0), dnBand(0), movAvgVal(0), movAvgVal2(0);
movAvgVal = average(((High + Low + Close)/3),40);
movAvgVal2 = average(((High + Low + Close)/3),35);
upBand = movAvgVal + AvgTrueRange(atrLength);
dnBand = movAvgVal - AvgTrueRAnge(atrLength);
if (movAvgVal > movAvgVal[1]) then Buy next bar at upBand stop;
if (movAvgVal < movAvgVal[1]) then Sell Short next bar at dnBand stop;
If(MarketPosition = 1) then Sell next bar at liquidPoint stop;
If(MarketPosition = -1) then Buy To Cover next bar at movAvgVal2 stop;Ignored
Dislikedlet me try to understand it.
would you please add more logic details pls.
The only part that i can understand on these codes are MA40 typical and ATR 40
Anything else is on grey zone...Ignored
DislikedSyanwar,
Yes, I will explain completely. first, here is a summary:
There are two moving averages: 1) average of high/low/lose, and 2)
moving averge of the true ranges.
In this system, the direction of the moving average and the penetration of
the bands is the entry technique. The liquidation of the position at the moving average is the exit. This is the exact code I got from a book in TS.
Inputs: avgLength(40), atrLength(40);
Vars: upBand(0), dnBand(0), movAvgVal(0), movAvgVal2(0);
(the first 2 lines are variables that are initialized)
movAvgVal = average(((High + Low + Close)/3),40); (moving average of last 40 bars)
movAvgVal2 = average(((High + Low + Close)/3),35); (moving average of last 35 bars)
upBand = movAvgVal + AvgTrueRange(atrLength); (moving average plus Average True Range of 40 bars - this is for a breakout of the band)
dnBand = movAvgVal - AvgTrueRAnge(atrLength); (same thing but to go short)
if (movAvgVal > movAvgVal[1]) then Buy next bar at upBand stop; (if the current moving average is greater than the previous moving average then buy at the UpBand)
if (movAvgVal < movAvgVal[1]) then Sell Short next bar at dnBand stop; (same thing, but to go short at lower band)
If(MarketPosition = 1) then Sell next bar at liquidPoint stop; (if long, then get out at the moving average - EXACT price)
If(MarketPosition = -1) then Buy To Cover next bar at movAvgVal2 stop; (If short, then get out at the moving average, EXACT PRICE).
Thanks!Ignored
let me know if these entry logic wrong.
I don't understand this terms and exit logic yet.
moving average of last 35 bars < What for?
EXACT price < I don't understand this.