Topics
Replies

firemyst
08 Aug 2023, 23:42

@Spotware please delete this spam


@firemyst

firemyst
08 Aug 2023, 06:19

RE: RE: placelimitorder success

luca.tocchi said: 

firemyst said: 

What do you mean by “activated”? DO you mean when the order is actually executed? If so, just check the trade result:

 

TradeResult r = PlaceStopOrder(TradeType.Buy, SymbolName,  volumeInUnits, Symbol.Bid + 15);

if (r.IsSuccessful) {

////

}

 

I mean when the pending order turns into position. 

Then do what I suggested. If the trade result is successful, you know you have a position. 


@firemyst

firemyst
08 Aug 2023, 00:05 ( Updated at: 21 Dec 2023, 09:23 )

You've done this?

Doing it manually through folder paths as you suggested, might not always work because you might not get the right folder (if there's bee multiple updates) or the data might be in more than one location


@firemyst

firemyst
08 Aug 2023, 00:03

They might consider it if you actually post this in the correct forum:

https://ctrader.com/forum/suggestions


@firemyst

firemyst
08 Aug 2023, 00:02 ( Updated at: 21 Dec 2023, 09:23 )

To make sure @Spotware sees this, please also report this issue and link to thread via the cTrader desktop app:


@firemyst

firemyst
07 Aug 2023, 23:58

If there's losing trades, you may want to consider leaving it as it is so you have to manually restart it. This does two things:

  1. makes sure your account doesn't blow up if it keeps continuously losing more than 3 trades
  2. gives you a chance to review the trades and what's happening.

 

If you really want it to start again the next day, you can try this:

  1. reset the losing count to 0
  2. keep track of the time. When your new day starts, allow the bot to proceed again. Something like this:

if (!allowTrades && Server.Time > 9am)

{

    allowTrades = true;

}

 

In your OnTick method:

if (allowTrades)

{

 ////rest of method

}

else

return;

 

and you'd have to update your code:

if (losercount == 3)

{

    allowTrades = false;

                            Stop();

}


@firemyst

firemyst
07 Aug 2023, 23:51

What do you mean by “activated”? DO you mean when the order is actually executed? If so, just check the trade result:

 

TradeResult r = PlaceStopOrder(TradeType.Buy, SymbolName,  volumeInUnits, Symbol.Bid + 15);

if (r.IsSuccessful) {

////

}


@firemyst

firemyst
07 Aug 2023, 00:13

You might get your wish if you post in the correct forum:

https://ctrader.com/forum/suggestions

 


@firemyst

firemyst
07 Aug 2023, 00:13 ( Updated at: 21 Dec 2023, 09:23 )

You need to have your charts in multichart mode and click this tool to do a little bit of what you want:


@firemyst

firemyst
07 Aug 2023, 00:04

POst a picture of your issue?


@firemyst

firemyst
07 Aug 2023, 00:03

Of course it's only doing buys. That's all you tell it to do. :-)

 

   private void OpenPosition(TradeType command)
        {
            ExecuteMarketOrder(TradeType.Buy, SymbolName, Volume, null, SL, TP);
        }

@firemyst

firemyst
05 Aug 2023, 00:28

@Spotware please delete this spam


@firemyst

firemyst
05 Aug 2023, 00:28

Just compile your bot without including the source code. That's how it is by default.


@firemyst

firemyst
03 Aug 2023, 00:34

@Spotware please delete this spam.


@firemyst

firemyst
02 Aug 2023, 12:05

Your code is saying get the fractal value from the last bar, not the actual last fractal value.

 

If that's not the case, then you need to post more of your code so people can see what's going on.


@firemyst

firemyst
02 Aug 2023, 12:01

You need to post this in the “Suggestions” forum


@firemyst

firemyst
02 Aug 2023, 12:00

Please keep us posted what you find out as I also use Pepperstone for one account.

Thank you.


@firemyst

firemyst
30 Jul 2023, 08:49

All they really have to do is change the default sorting on the page to “last added” which would go towards a long way of doing this.


@firemyst

firemyst
30 Jul 2023, 08:47

@Spotware, can you remove this spam?


@firemyst

firemyst
30 Jul 2023, 08:45

One issue you'll have is the trendlines are overwriting each other because you're giving them the same names.

 

Change the line:

ObjUp = string.Format("UpTrendLine");

to be this instead:

ObjUp = string.Format("UpTrendLine") + index.toString();

 

Do the same for the down trend line. This way, every up obj and down obj will have unique names so they won't overwrite each other.


@firemyst