Page 1 of 1

Write a code (c++)

Posted: Mon Mar 02, 2015 10:36 am
by JimAthens
Dear All,


I try to write a code (c++) for first time, so to start back testing automatic.

I need your help to move forward.

I would like to write that, if the EMA(16) (Exceptional Moving Average) is bigger than EMA(21) in three different timeframes at the same time.

For example, “Buy” when EMA(16)>EMA(21) in Timeframe (15’) and Timeframe(60’) and Timeframe(240’), at the same time.

My second question is:

Can I find somewhere the indicators for c++ ? I need the exceptional moving average (ΕΜΑ).

General, if someone can send me any strategy programming in c++, it will help me a lot to use the strategy as a guide to write my strategy.


Thank you very much in advance!

Dimitris

Re: Write a code (c++)

Posted: Tue Mar 03, 2015 5:38 am
by FX Helper
Hello,

You can find an example of a strategy in C++ language in C:\ForexTester2\Examples\Strategies\C++ folder (by default).
Sorry, but we don't have a programmers in C++ who can help you, our programmers are writting indicators/strategies on Delphi.

Re: Write a code (c++)

Posted: Wed Mar 04, 2015 12:08 pm
by JimAthens
Hello again!

Thanks a lot FX Helper!

Could someone explain to me how can program the below in c++ , or Delphi?

""""I would like to write that, if the EMA(16) (Exceptional Moving Average) is bigger than EMA(21) in three different timeframes at the same time.

For example, “Buy” when EMA(16)>EMA(21) in Timeframe (15’) and Timeframe(60’) and Timeframe(240’), at the same time. """

Thank you a lot!

Dimitris

Re: Write a code (c++)

Posted: Thu Mar 05, 2015 8:36 am
by FX Helper
Hello Dimitris,

You need to create a strategy, in this strategy create 6 EMA indicators.

MA1 := CreateIndicator('USDJPY', 15, 'MovingAverage',

format('%d;0;0;%s;Close', [MATrendPeriod, StrMAType(ma_EMA)]));

Then you can check indicator values via function GetIndicatorValue.

You can find description of these functions in Help -> Strategies API menu.

Re: Write a code (c++)

Posted: Mon May 09, 2016 11:53 pm
by violajsilver
Thank you so much for this post. It was really helpful.

Re: Write a code (c++)

Posted: Mon Sep 05, 2016 8:09 pm
by fabraz
Is it possible to share the RSi indicator code? I need an indicator whose behavior is very similar to that, but I dont know how to program the indicator box in the graph botton. Thanks in advance!