twitchingchimp_
twitchingchimp_
twitchingchimp_
Added topic Trailing Stop Function Ineffective
void Trailing_Stop()    {    for ( int i = OrdersTotal () - 1 ; i >= 0 ; i--)       {        if (m_position.SelectByIndex(i))
twitchingchimp_
Added topic Array out of range
Hi All, I have written the code below as an attempt to create a function that limits the number of open positions by closing either the oldest or least profitable depending on input settings, the code compiles however when I run it on backtest I get
twitchingchimp_
Added topic Closing position in an array
Hi All, I am attempting to write a function that limits the number of open positions held by closing the least profitable trades, I have written the code as below but am having trouble with the PositionClose() function, is there something I am
twitchingchimp_
Added topic closing profitable trades
Hi all, I am attempting to write a function that cycles through open positions and closes all those that are in profit by x amount and then returns true, and would return false in the case where no positions have been closed, I have the following
twitchingchimp_
Added topic placing hedged position at key levels
#include <Expert\Expert.mqh> MqlTick last_tick; MqlTick tickarray[ 2 ]; double last_bid = last_tick.bid; double last_ask = last_tick.ask; int openpositions = PositionsTotal (); bool levelcheck(); double bsl = last_ask - 150 * _Point ; double
twitchingchimp_
Registered at MQL5.community