albiizeka
albiizeka's avatar

Info

Username:albiizeka
Name:albiizeka
Member since: 06 Jan 2022

About

None

Signature

None

Last Forum Posts

@What are some brokers that offers trading in cTrader as standard account?:  04 Mar 2022, 10:50


Hi,

I'm trying to find a broker that offers trading in cTrader as standard account not as a raw spread (with commisions).

So far i tried ICMarkets even that is a good broker for me at least, they only way to open an account for cTrader is as a raw spread. I tried also pepperstone but due to their rules they only offer accounts to 1:30 leverage which is quite low for me. So have you guys tried something else in this case?

@Calculating P/L:  15 Feb 2022, 12:26


Hi,

I saw a lot of threads here, that in order to calculate Lot Size in OPEN API we must follow Profit/Loss Calculation Tutorial provided there.

As i'm following the tutorial and trying to implement that on my code i have two things that i'm not understanding.

1. When i send the request at ProtoOASymbolsForConversionReq the response of it not returning bid and ask price to do this part of code:

fromAsset = "JPY"
toAsset = "USD"

// rate will be our conversion result
rate = 1

// symbols are the ProtoOASymbolsForConversionRes symbols field
symbols[] = ProtoOASymbolsForConversionRes(fromAsset,toAsset)

asset = fromAsset 

FOR symbol in symbols:
    IF positionDirection == SHORT:
        closePrice = symbol.ask
    ELSE:
        closePrice = symbol.bid


    IF symbol.baseAsset == asset:
        rate = rate * closePrice
        asset = symbol.quoteAsset
    ELSE:
        rate = rate * 1 / closePrice
        asset = symbol.baseAsset

2. While reading the tutorial (maybe i'm missing something) the last part of code where is:

volume = positionVolumeMonetary / 100

My question here is where do we get this positionVolumeMonetary?

Regards, Albi!

Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.

No uploaded.

Warning! Executing cBots downloaded from this section may result in loss of funds. Use them at your own risk.

No uploaded.