Results 1 to 1 of 1
 2 Attachment(s)    

Thread: Milestone (by trevone) - SleepSeconds Variable

  1. #1
    Junior Member
    Join Date
    Oct 2016
    Posts
    1

    Default Milestone (by trevone) - SleepSeconds Variable

    Can someone help in modifying the code that "SleepSeconds" variable takes its value from a csv file (and refreshes its value).



    .
    .
    extern int SleepSeconds = 1440;
    .
    .
    .
    int start() {
    prepare() ;
    if( CloseAll ) closeAll() ;
    else {
    if( dailyGrowth / AccountBalance() < DailyGrowth && TimeCurrent() - lastTradeTime > SleepSeconds && ( marginLevel == 0 || marginLevel > MinMarginLevel ) ){
    if( totalTrades >= MaxStartTrades && ( AccountBalance() + ( totalProfit + totalLoss ) ) / AccountBalance() < TriggerBackSystem ) backSystem();
    else if( ( ContinueTrading || ( !ContinueTrading && totalTrades > 0 ) ) && ( totalTrades < MaxStartTrades || MaxStartTrades == 0 ) ) openPosition();
    else if( EnableCalendar && ffCalenadarEventTime1 < NewsReleaseMinutes ) newsSystem();
    }
    managePositions() ;
    longStop();
    }
    return( 0 ) ;
    }
    Attached Files Attached Files
    Last edited by mahirn; 10-27-2016 at 13:54.

Tags for this Thread

accountbalance, code, file, int, level, maxstarttrades, position, return, sleepseconds, star, start, total, totaltrades, trade

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •