Help Needed Coding Scalper EA

Can anyone create the code for the following details:

Forex Tick Stalker

I need an EA that will do the following:

Place two orders (1 buy and 1 sell) simultaneously at the starting price of each BAR (minute). With a selected stoploss, one of the two orders will close and hopefully the other will continue at a profit. This remaining order will try to get to take profit target.

This order will be closed 15 seconds (adjustable at Input Parameter) before the BAR (minute) ends.

The cycle begins again on the next BAR (minute).

The following are adjustable Input Parameters:

Header1="Tick Stalker"
TimeOnHour=0.0
TimeOffHour=23.0
RiskPercentage=1.0
MaxOrders=1
MaxLots=50
MaxSpread=6
StopLoss=0.0
TrailingStop=2.0
TakeProfit=10.0
1MCloseAfterSeconds= 40 seconds (this parameter can be adjustable between 40 seconds to 55 seconds
5MCloseAfterSeconds= 295 seconds (4minutes 55 second)
GMT=1
MagicNumber=13579
DailyProfitTarget=500.0 (this parameter is adjusted in increments of 500.00)

Details:

  1. The EA should be able to work on all major currencies on timeframe of 1M and 5M.
  2. On the chart BAR a blue arrow shows where orders were placed and a green arrow shows where the order was closed with profit. If it closed without profit the arrow will be red.
  3. Order should be closed before the ending of the BAR (minute).
  4. If next BAR (minute) appears and the order did not close it should close before the new two orders (buy and sell) are open.
  5. Once DailyProfitTarget is reached the EA will stop trading until the next TimeOnHour.
  6. The EA should be able to trade with two different currencies at the same time on their own with different Magic Numbers. (Ej. Each would work with their own DailyProfitTarget)

Thanks To All

<[email protected]>:):slight_smile:

hi dptrade,

Impossible is nothing !

try solution at D8D3.

Bright L.

You might have a future problem with that…apparently that’s called “hedging” and apparently that practise is going to be disallowed in the next month or so with US brokers I believe. So you might want to wait and see what comes of it first.
:wink: