@@ -239,84 +239,75 @@ class Stg_Retracement : public Strategy {
239
239
IndiAMAParams _indi_params (::Retracement_Indi_AMA_InpPeriodAMA , ::Retracement_Indi_AMA_InpFastPeriodEMA ,
240
240
::Retracement_Indi_AMA_InpSlowPeriodEMA , ::Retracement_Indi_AMA_InpShiftAMA ,
241
241
PRICE_TYPICAL , ::Retracement_Indi_AMA_Shift );
242
- _indi_params .SetDataSourceType (::Retracement_Indi_AMA_SourceType );
243
242
_indi_params .SetTf (Get <ENUM_TIMEFRAMES >(STRAT_PARAM_TF ));
244
- SetIndicator (new Indi_AMA (_indi_params ), ::Retracement_Indi_Type );
243
+ SetIndicator (new Indi_AMA (_indi_params , :: Retracement_Indi_AMA_SourceType ), ::Retracement_Indi_Type );
245
244
break ;
246
245
}
247
246
case STG_RETRACEMENT_TYPE_DEMA : // DEMA
248
247
{
249
248
IndiDEIndiMAParams _indi_params (::Retracement_Indi_DEMA_Period , ::Retracement_Indi_DEMA_MA_Shift ,
250
249
::Retracement_Indi_DEMA_Applied_Price , ::Retracement_Indi_DEMA_Shift );
251
- _indi_params .SetDataSourceType (::Retracement_Indi_DEMA_SourceType );
252
250
_indi_params .SetTf (Get <ENUM_TIMEFRAMES >(STRAT_PARAM_TF ));
253
- SetIndicator (new Indi_DEMA (_indi_params ), ::Retracement_Indi_Type );
251
+ SetIndicator (new Indi_DEMA (_indi_params , :: Retracement_Indi_DEMA_SourceType ), ::Retracement_Indi_Type );
254
252
break ;
255
253
}
256
254
case STG_RETRACEMENT_TYPE_FRAMA : // FrAMA
257
255
{
258
256
IndiFrAIndiMAParams _indi_params (::Retracement_Indi_FrAMA_Period , ::Retracement_Indi_FrAMA_MA_Shift ,
259
257
::Retracement_Indi_FrAMA_Applied_Price , ::Retracement_Indi_FrAMA_Shift );
260
- _indi_params .SetDataSourceType (::Retracement_Indi_FrAMA_SourceType );
261
258
_indi_params .SetTf (Get <ENUM_TIMEFRAMES >(STRAT_PARAM_TF ));
262
- SetIndicator (new Indi_FrAMA (_indi_params ), ::Retracement_Indi_Type );
259
+ SetIndicator (new Indi_FrAMA (_indi_params , :: Retracement_Indi_FrAMA_SourceType ), ::Retracement_Indi_Type );
263
260
break ;
264
261
}
265
262
case STG_RETRACEMENT_TYPE_ICHIMOKU : // Ichimoku
266
263
{
267
264
IndiIchimokuParams _indi_params (
268
265
::Retracement_Indi_Ichimoku_Period_Tenkan_Sen , ::Retracement_Indi_Ichimoku_Period_Kijun_Sen ,
269
266
::Retracement_Indi_Ichimoku_Period_Senkou_Span_B , ::Retracement_Indi_Ichimoku_Shift );
270
- _indi_params .SetDataSourceType (::Retracement_Indi_Ichimoku_SourceType );
271
267
_indi_params .SetTf (Get <ENUM_TIMEFRAMES >(STRAT_PARAM_TF ));
272
- SetIndicator (new Indi_Ichimoku (_indi_params ), ::Retracement_Indi_Type );
268
+ SetIndicator (new Indi_Ichimoku (_indi_params , :: Retracement_Indi_Ichimoku_SourceType ), ::Retracement_Indi_Type );
273
269
break ;
274
270
}
275
271
case STG_RETRACEMENT_TYPE_MA : // MA
276
272
{
277
273
IndiMAParams _indi_params (::Retracement_Indi_MA_Period , ::Retracement_Indi_MA_MA_Shift ,
278
274
::Retracement_Indi_MA_Method , ::Retracement_Indi_MA_Applied_Price ,
279
275
::Retracement_Indi_MA_Shift );
280
- _indi_params .SetDataSourceType (::Retracement_Indi_MA_SourceType );
281
276
_indi_params .SetTf (Get <ENUM_TIMEFRAMES >(STRAT_PARAM_TF ));
282
- SetIndicator (new Indi_MA (_indi_params ), ::Retracement_Indi_Type );
277
+ SetIndicator (new Indi_MA (_indi_params , :: Retracement_Indi_MA_SourceType ), ::Retracement_Indi_Type );
283
278
break ;
284
279
}
285
280
case STG_RETRACEMENT_TYPE_PRICE_CHANNEL : // Price Channel
286
281
{
287
282
IndiPriceChannelParams _indi_params (::Retracement_Indi_PriceChannel_Period ,
288
283
::Retracement_Indi_PriceChannel_Shift );
289
- _indi_params .SetDataSourceType (::Retracement_Indi_PriceChannel_SourceType );
290
284
_indi_params .SetTf (Get <ENUM_TIMEFRAMES >(STRAT_PARAM_TF ));
291
- SetIndicator (new Indi_PriceChannel (_indi_params ), ::Retracement_Indi_Type );
285
+ SetIndicator (new Indi_PriceChannel (_indi_params , :: Retracement_Indi_PriceChannel_SourceType ), ::Retracement_Indi_Type );
292
286
break ;
293
287
}
294
288
case STG_RETRACEMENT_TYPE_SAR : // SAR
295
289
{
296
290
IndiSARParams _indi_params (::Retracement_Indi_SAR_Step , ::Retracement_Indi_SAR_Maximum_Stop ,
297
291
::Retracement_Indi_SAR_Shift );
298
- _indi_params .SetDataSourceType (::Retracement_Indi_SAR_SourceType );
299
292
_indi_params .SetTf (Get <ENUM_TIMEFRAMES >(STRAT_PARAM_TF ));
300
- SetIndicator (new Indi_SAR (_indi_params ), ::Retracement_Indi_Type );
293
+ SetIndicator (new Indi_SAR (_indi_params , :: Retracement_Indi_SAR_SourceType ), ::Retracement_Indi_Type );
301
294
break ;
302
295
}
303
296
case STG_RETRACEMENT_TYPE_TEMA : // TEMA
304
297
{
305
298
IndiTEMAParams _indi_params (::Retracement_Indi_TEMA_Period , ::Retracement_Indi_TEMA_MA_Shift ,
306
299
::Retracement_Indi_TEMA_Applied_Price , ::Retracement_Indi_TEMA_Shift );
307
- _indi_params .SetDataSourceType (::Retracement_Indi_TEMA_SourceType );
308
300
_indi_params .SetTf (Get <ENUM_TIMEFRAMES >(STRAT_PARAM_TF ));
309
- SetIndicator (new Indi_TEMA (_indi_params ), ::Retracement_Indi_Type );
301
+ SetIndicator (new Indi_TEMA (_indi_params , :: Retracement_Indi_TEMA_SourceType ), ::Retracement_Indi_Type );
310
302
break ;
311
303
}
312
304
case STG_RETRACEMENT_TYPE_VIDYA : // VIDYA
313
305
{
314
306
IndiVIDYAParams _indi_params (::Retracement_Indi_VIDYA_Period , ::Retracement_Indi_VIDYA_MA_Period ,
315
307
::Retracement_Indi_VIDYA_MA_Shift , ::Retracement_Indi_VIDYA_Applied_Price ,
316
308
::Retracement_Indi_VIDYA_Shift );
317
- _indi_params .SetDataSourceType (::Retracement_Indi_VIDYA_SourceType );
318
309
_indi_params .SetTf (Get <ENUM_TIMEFRAMES >(STRAT_PARAM_TF ));
319
- SetIndicator (new Indi_VIDYA (_indi_params ), ::Retracement_Indi_Type );
310
+ SetIndicator (new Indi_VIDYA (_indi_params , :: Retracement_Indi_VIDYA_SourceType ), ::Retracement_Indi_Type );
320
311
break ;
321
312
}
322
313
case STG_RETRACEMENT_TYPE_0_NONE : // (None)
@@ -340,7 +331,7 @@ class Stg_Retracement : public Strategy {
340
331
int _direction = Order ::OrderDirection (_cmd , _mode );
341
332
uint _ishift = 0 ;
342
333
Chart *_chart = trade .GetChart ();
343
- IndicatorBase *_indi = GetIndicator (::Retracement_Indi_Type );
334
+ IndicatorData *_indi = GetIndicator (::Retracement_Indi_Type );
344
335
345
336
double _pp , _r1 , _r2 , _r3 , _r4 , _s1 , _s2 , _s3 , _s4 ;
346
337
ChartEntry _ohlc_range = _chart .GetEntry (::Retracement_Levels_Tf , _ishift + 1 , _chart .GetSymbol ());
@@ -384,7 +375,7 @@ class Stg_Retracement : public Strategy {
384
375
*/
385
376
bool SignalOpen (ENUM_ORDER_TYPE _cmd , int _method = 0 , float _level = 0 .0f, int _shift = 0 ) {
386
377
Chart *_chart = trade .GetChart ();
387
- IndicatorBase *_indi = GetIndicator (::Retracement_Indi_Type );
378
+ IndicatorData *_indi = GetIndicator (::Retracement_Indi_Type );
388
379
// uint _ishift = _indi.GetParams().GetShift(); // @todo: Convert into Get().
389
380
// bool _result = _indi.GetFlag(INDI_ENTRY_FLAG_IS_VALID, _shift); // @fixme
390
381
uint _ishift = _shift ;
0 commit comments