Create a simple function that return yesterday date, if yesterday is a sunday, return the date of Friday,

Job finished

Execution time 1 hour
Feedback from customer
Very quick response, the job was done perfectly, we will do business again.
Feedback from employee
Thank you very much, Mbeauverd!

Specification

Hello !

I use an Anchored VWAP indicator to check the direction of the market and place order using an EA.

Before market opening, I need to have the VWAP anchored the day before.


So I need a function that return date and time of the market opening for the indicator.
In my EA, I have this :

input int marketOpenHour            = 14;

input int marketOpenMinute          = 30;



string DateVWAP = TimeToStr(TimeCurrent(),TIME_DATE); //"yyyy.mm.dd";

datetime VWAPDateTime = StrToTime(StringConcatenate( DateVWAP , " " , marketOpenHour, ":" , marketOpenMinute));


The problem, is if the time is 11:00, the result will be in the future and the indicator will not work at all ... 

I need this to be modified that way :

Before market open at 14:30, we need to have DateVWAP returning the day before (yesterday), but if the day before is a Sunday, return the date of 3 days before.


Examples :

The EA is started Tuesday 2019.10.01 15:00 => the function return 2019.10.01 14:30
The EA is started Tuesday 2019.10.01 12:00 => the function return 2019.09.30 14:30

The EA is started Monday 2019.09.30 16:00 => the function return 2019.09.30 14:30

The EA is started Monday 2019.09.30 08:00 => the function return 2019.09.27 14:30


Responded

1
Developer 1
Rating
(600)
Projects
935
46%
Arbitration
31
39% / 29%
Overdue
93
10%
Free
2
Developer 2
Rating
(24)
Projects
27
22%
Arbitration
3
0% / 100%
Overdue
1
4%
Free
Similar orders
No time 4 games 30+ USD
I want a profitable EA to rent that can at least make 2usd an hour plz don’t waste my time and I want a demo tasting before purchasing/renting this EA
The job is simple, I want a custom indicator which consist of a combination of 3 indicators in separate window as I will show you in the screenshot of my mt5 trading platform. The indicators are RSI(period 14, Apply to close) Level 10 Buy, Level 50 Take profit, level 90 Sell) MA( Period 200, Method Exponential, Apply to Median price, Shift 0) BB (Period 25, Apply to close, Deviation 0.035, Shift 0) Ideally on a 1
the code wasn't mine, i have got it somewhere on the web, but i like the performance of the EA, so i want to use it on mt5 platform. the given code based on price movements with ladder entry concept
Good Day I would like to order a trading robot. Pairs: XAUUSD (GOLD) EUR/USD USD/JPY The robot should be trading daily with TP/SL build in, would like to have trailing and stop loss, should execute up to 5 trades (preffarable setting choice) up to 10 trades Los sizes to be choise setting, must also trade major US vews events Like:US- PPI, CPI, NFP, Sales m/m and so on Must also show/display alert when opening
Hello Guys, I need a trading bot for the MT5 to place order based on my trading strategy which is based on - >> entry based on EMA with rejection from specific levels like support and resistance area - levels and time frame i will apply into the robot manually on daily basis. also need - trailing stoploss , shift to breakeven after gaining some points. need a highly expert developer
I have a full strategy based on indicator and candle based on . i would like to make it into a robot which will trade for me on a specific time and specific rules. i need a person who can do this project for me. If you have done this type of job . you are most welcome for this. Apply only if you know binary trading option and binomo trading platform well and how it works
Enter buy trade at close of candle when bar closes above the 3 emas. Emas are 34 ema, 64 ema and 128 ema. For a buy trade the 34 ema must be above the other two emas. The 64 ema should be in the middle. The 128 ema should be below the other two emas. For a buy trade the Awesome Oscillator should be above the middle line and colored green. Exit a buy trade when price touches 64 ema. Sell trade same conditions as buy
I want to make AI based on Attached Picture Swing High low. If you have experience can share demo first. Stop loss, take profit, trailing , break even ,DD etc. also amiable
Hello, I’m looking for a TradingView indicator that fits my forex trading needs. If you can create or customize one for me, please reach out. I'd appreciate your help! Thanks in advance."
Pls I need help I don’t have much but pls accept my little payment for the work thanks 🙏 mt5 file Once it opens buy and move positively to buy let it use auto trailing to follow the trend that’s if I choose to use trailing option and before the trailing starts it must reach the actual profit target example if I set profit target to 500 then once profit is at 500 let trailing immediately protect it and any 1 pip

Project information

Budget
35+ USD
For the developer
31.5 USD
Deadline
from 1 to 3 day(s)