Convert simple Tradingview PineScript v4 Strategy into MQL5 AND MQL4 Expert

MQL5 Dönüştürme

İş tamamlandı

Tamamlanma süresi: 1 gün

İş Gereklilikleri

Hello,

I have a simple pine script that needs to be converted into an EA.


//@version=4
strategy("Price Channel Strategy", overlay=true)
length = input(20)
hh = highest(high, length)
ll = lowest(low, length)
if (not na(close[length]))
    strategy.entry("Long", strategy.long, comment="long", stop=hh)
    strategy.entry("Short", strategy.short, comment="short", stop=ll)

This script should have the following functions:

-ability to backtest

-Starting capital should be read from account balance, same for currency that is used

-LotSize input - how much I want to use for trades, from 0,01 to 0,1 to 1 (of course I can set what I what I want e.g. 0,3 as well and so on)

-Automatic trade execution (for example -  EA opens long position, after the next signal appears a short position will be opened where the long position is automatically closed and viceversa, only ONE position can be taken at a time)

SourceCode included of course

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(590)
Projeler
789
71%
Arabuluculuk
9
33% / 33%
Süresi dolmuş
22
3%
Serbest
Yayınlandı: 8 kod
2
Geliştirici 2
Derecelendirme
(67)
Projeler
97
35%
Arabuluculuk
11
27% / 45%
Süresi dolmuş
13
13%
Serbest

Proje bilgisi

Bütçe
30+ USD
Son teslim tarihi
to 1 gün