Hi,
I am new to programming and using GFT Chart Studio. Below is the program I am working on.
I want the program to due the follow:
If the price closes above the 55 EMA buy 1 lot.
Stoploss of 30pips
Sell if 200pip increase
Do the same if the 55 EMA closes below.
Also if anyone can recomend books on programmer would be helpful
strategy sample_ema12355;
input period=55,lots=1,delta=0.0030;
vars ma(series);
begin
ma:=ema(close,period);
if crossup(close,ma) then buy (lots);
if crossup (close,ma)then stop_sell (lots,close[back(close)]-delta);
if crossdown (close,ma)then sell(lots);
if crossdown (close,ma) then stop_buy (lots,close[back(close)]+delta);
end.
Thank you
Rich
I am new to programming and using GFT Chart Studio. Below is the program I am working on.
I want the program to due the follow:
If the price closes above the 55 EMA buy 1 lot.
Stoploss of 30pips
Sell if 200pip increase
Do the same if the 55 EMA closes below.
Also if anyone can recomend books on programmer would be helpful
strategy sample_ema12355;
input period=55,lots=1,delta=0.0030;
vars ma(series);
begin
ma:=ema(close,period);
if crossup(close,ma) then buy (lots);
if crossup (close,ma)then stop_sell (lots,close[back(close)]-delta);
if crossdown (close,ma)then sell(lots);
if crossdown (close,ma) then stop_buy (lots,close[back(close)]+delta);
end.
Thank you
Rich