str/mql4/ex4 ファイルのみ読み込み
2件の返信
こんにちは、,
when we export strategy to mql4, can be adedded format dedicated only for backtest?
Example: i will export mql4 file of my strategy and i want to share it with some stranger. so i compile the mql4 file to ex4 and the ex4 file will be locked to backtesting only, trading not allowed.
the same could be with str file, create str that will be reading only-no exporting mql4 etc. not showing the source code. But can be shared with others.
Thanks for considering it.
0
For the MQ4, just edit the last function in the file like this and then compile to ex4:
bool customStart() {
return IsTesting();
}
If the EA is not running in the tester, it will not trade.
0
First of all there are DeCopmpailers that can decompail your ex4 into mq4, but they are not that smart..,
make sure to add those lines above all of your code:
#property copyright "Copyright © 2016, YOUR NAME HERE." #property description "MAYBE AN EMAIL HERE BUT SOMETHING GOT TO BE HERE"
And to your question add this under your OnStart() function:
if(!IsTesting()) {return(true); Print("THIS EA IS LOCKED AND CAN BE USED ONLY IN BACKTESTING.");}
0
2件の返信を表示中 - 1 - 2件目 (全2件中)