Who wants a strategy? Lots and for free) - page 44

 

Question on FxSB + Net C#.

I've been struggling to translate at least "my" indicators (the ones that were "fitted" in the strategy) into mql4.

Question - is it possible (easy) to compile all this "stuff" into a dll, which then can be called in an Expert Advisor? (without rewriting the code, of course).

I myself am far from all these Net's and "dieses". TurboC 2.0 rules ;).

 
SergNF писал(а) >>

Question on FxSB + Net C#.

Tired to translate at least "my" indicators (those that were "fitted" in the strategy) into mql4.

Similar. It is very tedious.

SergNF wrote >>

The question - is it possible (easy) to compile all this "stuff" into a dll, which then can be called in an Expert Advisor? (without rewriting the code, of course).

I myself am far from all these Net's and "dieses". TurboC 2.0 rules ;).

I used to be quite good friends with Net, but long time ago. Anyway, the mere compiling will not do, because it is necessary to take into account all nuances of MT4. In general, you need a lot of enthusiasm and time. Imho, it is easier to write the exact analogues in mq4, and propose to Miroslav to put the sources into the same "rich house".

Doesn't TurboC make dlls? :)

 
voltair писал(а) >>

Same here. It's a pain in the ass.

I used to be quite good friends with Net, but a long time ago. In any case, you will not be able to just compile it, because you have to take into account all nuances of MT4. In general, I need a lot of enthusiasm and time. Imho, it is easier still to write the exact analogues in mq4. And suggest that Miroslav put the source code into the same "rich house".

No. It seems to me that it's easier to make some "binding" (so that not to edit the source code) to the texts from the sources, and link dlls in mql4.

voltair wrote >>

Doesn't TurboC link dlls? :)

It was a joke - compiler in times when computers were big and DOS ruled. :)

Now, if need be, I am writing in Delphi 6.0, for which I also have to rework all sources. I want to copy/paste/ompile and all.

voltair wrote(a) >>

...Just compile will not work, because you have to take into account all nuances of MT4....

From the dll, it is sufficient to return something like:

// Sets the component's type
if (slotType == SlotTypes.OpenFilter)
{
component[1].DataType = IndComponentType.AllowOpenLong;
component[1].CompName = "Allows long positions opening";
component[2].DataType = IndComponentType.AllowOpenShort;
component[2].CompName = "Allows short positions opening";
}
else if (slotType == SlotTypes.CloseFilter)
{
component[1].DataType = IndComponentType.ForceCloseLong;
component[1].CompName = "Forces long positions closing";
component[2].DataType = IndComponentType.ForceCloseShort;
component[2].CompName = "Forces short positions closing";
}

 
SergNF писал(а) >>

No. It seems to me that it's easier to make some "binding" (so as not to edit the source code at all) to the texts from the Sources and link dlls in mql4.

Notice at least that the numbering of bars is opposite... In FxSB the last bar is not zero, but on the contrary, it's the maximal for the history. Plus there are various other nuances. So, imho, if somebody is going to do the binding, then of course I would be honored. But I would not. More reasons below.

SergNF wrote(a) >>

... I would like to copy/paste/uncompile and that's it.

From dll's it's enough to return something like .

But how to optimize it afterwards?

I think it is easier to write the xml to mq4 converter. But for this you need the library of FxSB indicators in the code of mq4. But this work can be done in parallel. Everyone (willing and able) will code an indicator, in couple of weeks (optimistically, of course :) ) everyone will do it. And the xml-key converter won't be hard to write. And "binding" is, imho, for a long time.


P.S. Oh! Here Miroslav below writes about the same (indicator library in mq4)!

 

Hello,

I noticed that when Forex strategy Builder runs in Russian an unpleasant overlap appears in the "Generator" tool. It seems the Russian font is wider than the English one. I'll correct this today.

If you have corrections or suggestions to the Russian translation, please contact me. (The translation can be edited online in the programs help system.)

The compatibility between Forex Strategy Builder and MetaTrader is a different question. There are several possible ways to make the strategies of FSB working in MT. The most natural to me is to make a set of proper MQL4 indicators. It should not be so difficult since the indicators I'm using are pretty standard. The greatest part of the C# code is implementation of the logic rules for application of the indicators. It looks terrific but it describes simple logic only. I'm ready to help everyone who wants to adopt the code.

It's possible to start an open source progect fsb2mql converter. It will benefit all the MetaTrader users.

 

voltair писал(а) >>

I have my counter-arguments (pure compatibility, relevance, "translate error free"), but I won't insist, as I see "it" as a "mind game" - to clear my mind from my main work.

It looks terrific but it describes simple logic

And other "Latin" stuff :)

Eh. We're not kosmopoletes ;)

 
Miroslav_Popov писал(а) >>

... There are several possible ways to make the strategies of FSB working in MT. The most natural to me is to make a set of proper MQL4 indicators. I'm ready to help everyone who wants to adopt the code.

It's possible to start an open source progect fsb2mql converter. It will benefit all the MetaTrader users.

Perfectly! And it coincides with my offers. I suggest to write the converter fsb2mql on... mq4! :) If it will be some script of MT4 it will be convenient for everyone.

 

Total off-topic.

When they tried to "rewrite" the lawyers, there were whole threads comparing "pixel by pixel" charts of purchased and newly written ones.

In this case - of course there is an author, but there will be whole "translation error"/drawing indicator/just bullshit flams about any inconsistency between any FSB and MT4 transaction.

ZS. On the one hand, I guessed that in addition to writing

#define MT4_EXPFUNC __declspec(dllexport)
MT4_EXPFUNC BOOL __stdcall ...

I guess I will have to "adapt" a lot - describe structures and stuff like that.

On the other hand, when I rewrote it in mql

// ---------------------------------------------------------
Bulls_Bears_Power BBP = new Bulls_Bears_Power(slotType);
BBP.IndParam.ListParam[1].Index = parameters.ListParam[1].Index;
BBP.IndParam.NumParam[0].Value = parameters.NumParam[0].Value;
BBP.IndParam.CheckParam[0].Checked = parameters.CheckParam[0].Checked;
BBP.Calculate(slotType);

afIndicator1 = BBP.Component[0].Value;
afIndicator2 = MovingAverage(iPeriod2, 0, maSignalMAMethod, afIndicator1);
// ----------------------------------------------------------

for (int iBar = iFirstBar; iBar < Bars; iBar++)
{
afOscllator[iBar] = afIndicator1[iBar] - afIndicator2[iBar];
}

I just... I was not sure about the correctness.

ZSY. I'm not insisting on anything. I just wonder if the signals/profits/logs will be the same for a case a bit more complicated than Figar0's one.

 

Exporting full Expert Adviser from Forex Strategy Builder is not so easy. FSB uses 9 strategy templates so far and I think I'll double them shortly. Another problem is that some of the indicator functions are implemented in the backtester core instead of the indicator class. There are also several specific cases FSB manage differently than the MT backtester. Off course I can explain every step of the process if somebody is interested in.

However I don't see problems to write 90% of the indicators and the logic rules to MQL4. Actually I tested personally great variety of strategies in both testers to be sure of the reliability of FSB. There is very little number of differences between the backtests and they are in specific cases that FSB manages in special care in order to improve the backtest.

 
Miroslav_Popov >> :

Hello dear traders,

I'm Miroslav Popov - the author of Forex Strategy Builder.

I noticed recently more Russian and Ukrainian visitors coming to the Forex Strategy Builder's website because of this discussion. I hope some of you will find the program useful.

I don't want to flood your forum since I'm not confident in Russian.

Wish you luck and profit!

Bye

Dear Miroslav!

I show the admirer of your labour.

That you create this great prodigy.

I have already programmed 6 your strategies, remake your indicators for MetaTrader.

And very complacent that have a chance, using your boundless bounty, become happier.