A little did not understand the meaning of the EA, it does not show profit, and to make the EA traded only at night is not difficult ...
I wrote this EA in order to test the effectiveness of trading at night. Maybe you can tell me how to make it profitable?
Now I am thinking how to make the EA make only one trade per night. I haven't figured it out yet.
Why don't you use the OnTrade event?
I wrote this EA in order to test the effectiveness of trading at night. Maybe you can tell me how to make it profitable?
Now I am thinking how to make the Expert Advisor make only one trade per night. I haven't figured it out yet.
First you should make it consistently break-even, and then think about profit.
What is there to think about: add one variable (or class property if OOP), "in the morning" set it to 0 or false (depending on the implementation), and "in the evening" control its value to catch the fact of transactions.
You should start by making it consistently break-even, and then think about profit.
What is there to think about: add one variable (or class property if OOP), set it to 0 or false (depending on the implementation) in the "morning", and control its value in the "evening" to catch the fact of transactions.
If only it were that simple... I used to set a global variable OrderCount.
Zeroed it in the morning:
if(dt.hour >= 7 || dt.hour <=20) { OrderCount=0; }
Monitored the value:
if(Buy_Condition && (!PositionSelect(_Symbol))) { if(dt.hour >= 23 || dt.hour < 6) { if(OrderCount<1) { // Здесь торгуем } OrderCount++; } }
So no change. Trades for the whole period. Several trades.
Without zeroing it makes only one trade for the whole period. I tried also with bool and with flips and separately for buy and sell variables.
Can I control the time of the last trade?
If only it were that simple... I set the global variable OrderCount.
I reset it in the morning:
Control the value:
So no change. Traded the entire period. Multiple trades.
Without zeroing it makes only one trade for the whole period. Tried also with bool and with flips and separately on buy and sell variables.
Maybe I should also control the time of the last trade?
And a funny report came out on testing since 2000.
tester parameters: Currency - EURUSD, TF - 4H, Depo - 10 000$.
And a cool report came out on testing from 2000.
tester parameters: Currency - EURUSD, TF - 4H, Depo - 10 000$.
Is it with one trade per night or did you change something else, except for the timeframe? I looked at the test and the rest remained the same.
The MASTER'S business is afraid! )))

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
The "Night" Expert Advisor:
An Expert Advisor for trading during the night.
Thos Expert Advisor trades on EURUSD (M15), according the signals of Stochastic indicator. It uses a simple money management system.
Author: AM2