Experts: Manual Scalping With Keyboard

 

Manual Scalping With Keyboard:

A lightweight tool for manual scalping in MT5 using keyboard shortcuts

Manual Scalping With Keyboard

Author: Thibauld Charles Ghislain Robin

 

Hello,


Very nice tool, but would be even better with CLOSE ALL button.

What is FLAT ON/OFF system?


thanks

 
Mr. Pink #:

Hello,


Very nice tool, but would be even better with CLOSE ALL button.

What is FLAT ON/OFF system?


thanks

Just glancing at the code...

void OnTick()
{
    CheckDailyReset();
    if(flatActive) CheckFlatSystem();
    UpdateDashboard();
    
    if(MaxDailyLoss > 0 && dailyPL <= -MaxDailyLoss)
    {
        CloseAllPositions();
        SetStatus("DAILY LIMIT REACHED", C'255,50,50');
        return;
    }
}

So, if your input MaxDailyLoss is set above 0 and your dailyPL negatively exceeds your MaxDailyLoss, then all positions are closed, e.g., CloseAllPositions().

IMHO, this uitlity's source code could be a good way for you to learn how to write your own close all button.

In any event, it appears that the number 5 key on your 10-key pad is already coded to instantly flatten--close all.

 
Will it work with keyboards without Numeric Pads?
 
Kashif Salman #:
Will it work with keyboards without Numeric Pads?

Based on this ASCII keycode map, yes: Interactive ASCII Keyboard – Explore ASCII Codes | GetASCII